[lldb-dev] a problem with source listing in my lldb port

chansarav chansarav at gmail.com
Wed Jul 17 06:07:00 PDT 2013


Source listing is not working in my lldb port. For the command "source list
-n main" I got the following output:

(snip)
File: workplace/app/src/workplace/app/src/main.c.
(snip)

Also when a breakpoint is hit, the corresponding source code lines are not
displayed.


I debugged lldb and found that the path to source file is calculated by
combining 'cu_comp_dir' (DW_AT_comp_dir) and 'cu_die_name' (DW_AT_name).

The DWARF info generated is as follows:

(snip)
    <1cb>   DW_AT_name        : (indirect string, offset: 0x129):
workplace/app/src/main.c
    <1cf>   DW_AT_comp_dir    : (indirect string, offset: 0x14d):
workplace/app/src
(snip)

Just for experimentation, I removed the inclusion of 'cu_comp_dir'
(DW_AT_comp_dir) in the source file path calculation (by editing
DWARFDebugLine.cpp and SymbolFileDWARF.cpp). After this, the 'source list'
command works, also the source lines are displayed for the breakpoint hit.

I need a clarification on where the problem is? Can someone help me on this?

Thanks,
Chandra Kumar R.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130717/5deeafff/attachment.html>


More information about the lldb-dev mailing list