First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 65404
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Igor V. Kovalenko <garrison@mail.ru>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
gdb-6.2.1-dwarf2read-relative.patch A patch by Bryce McKinlay rediffed against gdb-6.2.1 patch Igor V. Kovalenko 2004-09-26 07:07 0000 3.42 KB Details | Diff
gdb-relative-test.tar.bz2 test case to verify this bug application/x-bzip Igor V. Kovalenko 2004-09-26 07:22 0000 965 bytes Details
gdb-6.2.1-dwarf2read-relative-v3.patch Alternative patch with relation to compilation directory patch Igor V. Kovalenko 2004-09-29 17:25 0000 3.76 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 65404 depends on: Show dependency tree
Show dependency graph
Bug 65404 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-09-26 06:57 0000
gcc may emit relative directory name for some included files.
While debugging programs which have dwarf2 debug information
and are not in the build hierarchy (i.e. installed to other location)
gdb fails to find such included files though all needed information
(source directory et al) is available.


Reproducible: Always
Steps to Reproduce:
1. Build a package which uses relative include paths and install resulting binary somewhere outside build directory.
2. Start a gdb session, then try to single-step into function which is implemented in #included file.

Actual Results:  
gdb say "No such file or directory" for such a file.

Expected Results:  
Included file should be correctly located.

This problem is addressed in a message thread resulting in a patch by Bryce
McKinlay, see http://sources.redhat.com/ml/gdb-patches/2004-07/msg00456.html for
details.
So this probably would be in the next released gdb, but it is not yet available
in current gdb CVS.

------- Comment #1 From Igor V. Kovalenko 2004-09-26 07:07:35 0000 -------
Created an attachment (id=40447) [edit]
A patch by Bryce McKinlay rediffed against gdb-6.2.1

A patch by Bryce McKinlay mentioned in desc, rediffed against gdb-6.2.1
I successively use gdb-6.2.1 with this patch and do not see this problem.

------- Comment #2 From Igor V. Kovalenko 2004-09-26 07:22:49 0000 -------
Created an attachment (id=40448) [edit]
test case to verify this bug

To check please unpack a test case, then cd to gdb-relative-test and do 
export WANT_AUTOMAKE=1.8
autoreconf -i
./configure -v --prefix=`/bin/pwd`/inst
make install

then execute gdb as follows:
LD_LIBRARY_PATH=`/bin/pwd`/inst/lib gdb inst/bin/hello

then at gdb prompt do
break main
run
step
step

here you either see "9	aa.hh: No such file or directory"
which means gdb fails to find included file, or you do not see
the error and "list" command would display the correct source
code lines from included file

------- Comment #3 From Igor V. Kovalenko 2004-09-29 17:25:36 0000 -------
Created an attachment (id=40738) [edit]
Alternative patch with relation to compilation directory

As I'm reading dwarf standard, relative paths should be handled in relation to
compilation directory. This alternative patch does exactly this everywhere
relative path entry is found in dwarf directory table.
This patch makes some gdb testsuite failures. Now I strongly believe testsuite
should be somewhat fixed in relative paths handling :)

------- Comment #4 From SpanKY 2004-11-09 18:19:03 0000 -------
added patch to 6.2.1-r1, thanks

First Last Prev Next    No search results available      Search page      Enter new bug