[LLVMdev] getMetadata(“dbg”) returns NULL

Mingliang LIU liuml07 at gmail.com
Thu Apr 24 10:04:14 PDT 2014


Neither of the solutions you found uses llvm-gcc.


On Thu, Apr 24, 2014 at 11: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
>
> 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
>
>


-- 
Mingliang LIU (刘明亮 in Chinese)

PACMAN Group,  Tsinghua University
Email: liuml07 at mails.tsinghua.edu.cn
Homepage: http://pacman.cs.tsinghua.edu.cn/~liuml07/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140424/346291ee/attachment.html>


More information about the llvm-dev mailing list