[LLVMdev] getMetadata(“dbg”) returns NULL

David Blaikie dblaikie at gmail.com
Thu Apr 24 07:11:38 PDT 2014


On Thu, Apr 24, 2014 at 1:42 AM, 李永超 <lyc364 at gmail.com> wrote:
> Hi,
> getMetadata(“dbg”) returns NULL for such a small program as follows:
>
>
> int main(){
> char a[10], b[2];
> if(a[0] != 0 && a[1] != 0){
> strcpy(a, b);
> }
> return 0;
> }
>
> The compiling command is:  llvm-gcc --emit-llvm -g -c ./src.c

llvm-gcc is dead and unmaintained. Try clang?

>
> I also tried the solutions I found through Google:
> http://stackoverflow.com/questions/14943447/llvm-line-number-of-an-instruction
> http://stackoverflow.com/questions/23089316/getmetadatadbg-returns-null-despite-producing-ir-with-clang-g-s-emit-llv
>
> but neither of them works.
>
> Does anyone have any idea about this?
> Thanks,
> Yongchao.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list