[lldb-dev] [LLVMdev] How is variable info retrieved in debugging for executables generated by llvm backend?
dblaikie at gmail.com
Thu Feb 20 14:07:00 PST 2014
On Thu, Feb 20, 2014 at 1:58 PM, Yuri <yuri at rawbw.com> wrote:
> On 02/18/2014 00:44, 杨勇勇 wrote:
>> I ported llvm backend and lldb recently. Both tools can basically work.
>> lldb is able to debug programs in asm style and frame unwinding is OK.
>> But "frame variable XX" does not work because lldb is not able to
>> the address of
>> XX from debug info.
> I recently did some work with the debug info as generated by llvm, and
> there are a lot of bugs. LLVM writes wrong DWARF info. My impression is
> that DWARF writer is barely passable with clang-generated code, or maybe it
> malfunctions with clang as well. People don't hold debug info to the same
> high standard as the code itself.
> Here is an example when variable info generated is plain wrong:
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.
(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)
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev