[lldb-dev] a problem with source listing in my lldb port
gclayton at apple.com
Wed Jul 17 10:45:15 PDT 2013
Look alike the problem is DW_AT_comp_dir is not a full path to the current working directory. Looks like a compiler bug.
On Jul 17, 2013, at 6:07 AM, chansarav <chansarav at gmail.com> wrote:
> Source listing is not working in my lldb port. For the command "source list -n main" I got the following output:
> File: workplace/app/src/workplace/app/src/main.c.
> 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:
> <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
> 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?
> Chandra Kumar R.
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
More information about the lldb-dev