[LLVMdev] Simple example of creating debug info?

Eric Christopher echristo at gmail.com
Mon Feb 9 13:03:57 PST 2015


On Mon Feb 09 2015 at 12:56:17 PM David Blaikie <dblaikie at gmail.com> wrote:

> On Mon, Feb 9, 2015 at 12:46 PM, David Jones <djones at xtreme-eda.com>
> wrote:
>
>> Is there a simple example of how to add debug metadata to IR using the
>> C++ API?
>>
>
> Yep: http://llvm.org/docs/tutorial/LangImpl8.html
>

Also:

http://llvm.org/devmtg/2014-10/#tutorial3

Which walks you through how we did it. :)

-eric


>
>
>
>>
>> All I really need right now is the ability to annotate an instruction
>> with line number and file name, although describing variables will be
>> useful later.
>>
>> It's not clear from reading the include files how to "put it all
>> together".
>>
>> Unfortunately, the output of my compiler is getting a little large to
>> wade through by hand. I'd love to be able to set a breakpoint  in GDB to
>> file:line in my source language, so as to step through the generated
>> assembly code.
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150209/8895f914/attachment.html>


More information about the llvm-dev mailing list