|
|
|
Re: Where are debug launcher "source container" types documented? [message #1754533 is a reply to message #1754521] |
Sun, 19 February 2017 16:52 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
They seem to be for use only by Eclipse.
When I changed the source location to Program Relative, Eclipse tried to find the source at /home/dvavra/proj/Hello/Debug/src/Hello.cpp (which is <exec path>/<subdir 'src'>/Hello.cpp) for the first breakpoint. GDB had no trouble listing the code at the breakpoint. I'm not sure but I think /home/dvavra/proj/Hello/Debug/src was simply the last directory tried by Eclipse and not something from the debug info.
Compilation directory asked for the directory location then used that as the base directory path.
When I set a breakpoint, Eclipse sent the relative and absolute paths. In this case the debug source paths (in Eclipse) started at the project directory.
675,740 44-break-insert -f /home/dvavra/proj/Hello/src/Hello.cpp:73
675,741 44^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400db3"\
,func="main()",file="../src/Hello.cpp",fullname="/home/dvavra/proj/Hello/src/Hello.cpp",line="73",th\
read-groups=["i1"],times="0",original-location="/home/dvavra/proj/Hello/src/Hello.cpp:73"}
The debug info in the executable has the path to the compilation directory (also the location of the executable) and a relative path to the source
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_producer : (indirect string, offset: 0xf0): GNU C11 6.3.1 20161221 (Red Hat 6.3.1-1) -mtune=generic -march=x86-64 -g -O2 -fmessage-length=0
<10> DW_AT_language : 12 (ANSI C99)
<11> DW_AT_name : (indirect string, offset: 0x5b): ../src/Florp.c
<15> DW_AT_comp_dir : (indirect string, offset: 0x1e): /home/dvavra/proj/Hello/Debug
:
:
<0><3f1>: Abbrev Number: 1 (DW_TAG_compile_unit)
<3f2> DW_AT_producer : (indirect string, offset: 0x43cf): GNU C++11 6.3.1 20161221 (Red Hat 6.3.1-1) -mtune=generic -march=x86-64 -g -O0 -std=c++11 -fmessage-length=0
<3f6> DW_AT_language : 4 (C++)
<3f7> DW_AT_name : (indirect string, offset: 0xc05): ../src/Hello.cpp
<3fb> DW_AT_comp_dir : (indirect string, offset: 0x1e): /home/dvavra/proj/Hello/Debug
If you've found something that works, by all means stick to it. The default settings work for me.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04164 seconds