Where are debug launcher "source container" types documented? [message #1754483] |
Sat, 18 February 2017 10:49  |
Eclipse User |
|
|
|
Is there any doumentation on what the different source container types that you can add to the source lookup path in a debug launchc onfiguration actually do.
If not can, someone point me at where amongst the many source repositories and files I can find the code that implements this stuff. A URL would be nice.
On my installation I am offered the following container types.
1. Absolute file path - The does not ask for any additional parameters. So I have no idea what it does.
2. Compilation directory - This brings up a parameter dialog that has some explanation in it, I am guessing that this wants an absolute file system path that will be used as a root to be fed into the gdb path resolver.
3. File system directory. How is this different from number 2.
4. Path mapping. This is the only one I understand.
5. Program relative file path. Like number 1, so no idea.
6. Project - This asks for another project. But no information on how this affects the paths.
7. Project - Path relative to source folders. No explanation of what this means in this context.
8. Workspace - Asks for a workspace. . No explanation of what this means in this context.
9. Workspace folder - Asks for a folder in a workspace. No explanation of what this means in this context.
Thanks,
Roger
|
|
|
|
|
Re: Where are debug launcher "source container" types documented? [message #1754533 is a reply to message #1754521] |
Sun, 19 February 2017 11:52   |
Eclipse User |
|
|
|
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.
|
|
|
|
|
Re: Where are debug launcher "source container" types documented? [message #1754605 is a reply to message #1754572] |
Mon, 20 February 2017 15:06  |
Eclipse User |
|
|
|
Jonah,
I had looked at that.
I have now discovered the root cause of my problems. The project I am working on is in eclipse terminology an external makefile project. This makefile uses ccache to cut down rebuilds. I have written a cautionary tail about using ccache in a debugging environment here https://lists.gt.net/mythtv/dev/606984. Suffice to say that if you have more than copy of a source hierarchy you can end up with unexpected debug information in objects in one tree that have unchanged source from ones that were previously compiled in another tree. The result is total confusion.
Roger
|
|
|
Powered by
FUDForum. Page generated in 0.04141 seconds