[LLVMdev] How is variable info retrieved in debugging for executables generated by llvm backend?

David Blaikie dblaikie at gmail.com
Thu Feb 20 14:24:55 PST 2014


On Thu, Feb 20, 2014 at 2:16 PM, Yuri <yuri at rawbw.com> wrote:

> On 02/20/2014 14:07, David Blaikie wrote:
>
>> Certainly there are bugs, but practically speaking I wouldn't characterize
>> clang-generated debug info to be "barely passable". It generally works for
>> me - it passes much of the GDB 7.5 test suite successfully.
>>
>
> Clang works, but I am getting an impression that any deviations from what
> clang does causes troubles.
> I don't know, every time I look, I find something wrong with resulting
> DWARF.
>
>
>
>> (this is all predicated on: "at -O0" - optimized debug info is another
>> story entirely. Though there are even issues with locations (and sometimes
>> even types!) at -O0, but they're pretty rare in my experience - I use
>> Clang
>> to debug Clang day-to-day and only every few months do I hit a bug)
>>
>
> Yes, my test case is for -O0 and CL=Large.


Not sure what you mean by "CL=Large". Another caveat to -O0, is that's
Clang's style of -O0 (this is one of those "what Clang generates is what
works best" cases): emitting allocas for each variable to keep track of the
location easily.

Also, it's not clear that Yang even has the issues you have - no mention of
a custom frontend, just a custom backend (granted no mention that Yang is
using Clang either, so it could go either way).

- David


> Debug info for optimized code is a different issue, you are right.
>
> Yuri
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140220/a1d3db79/attachment.html>


More information about the llvm-dev mailing list