This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/17497] New: gdb doesn't always consider normalized source file paths when inserting breakpoints
- From: "malaperle at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 20 Oct 2014 20:22:09 +0000
- Subject: [Bug breakpoints/17497] New: gdb doesn't always consider normalized source file paths when inserting breakpoints
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17497
Bug ID: 17497
Summary: gdb doesn't always consider normalized source file
paths when inserting breakpoints
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: malaperle at gmail dot com
I have an executable with debug symbols with a path that look likes
/build-server/program/build/../file.c
I try to insert a breakpoint by using the CLI "b /build-server/program/file.c"
If file.c doesn't exist, gdb fails to insert the breakpoint with "No source
file named".
However, if file.c exists, it works. So it seems that in that case it correctly
normalizes the source file path in the debug symbols and removes the
"build/../" part so that it can be matched.
Some background:
This is especially a problem when using Eclipse with path mapping. For example,
the program was compiled in /build-server/program/build on another machine and
I try to debug it on my local machine with the source files in
/home/user/program. If I create this mapping:
/home/user/program -> /build-server/program/build/../
The paths in the mapping get normalized (by Eclipse) to this:
/home/user/program -> /build-server/program/
So that when I set a breakpoint in /home/user/program/file.c, it issues the
command to insert in /build-server/program/file.c. But that doesn't work, as
explained above. One could argue that this could be changed on the Eclipse side
so that it doesn't normalize the paths but I think it's reasonable to expect
that the user should be able to enter "b /build-server/program/file.c" and
expect it to work on the command line.
--
You are receiving this mail because:
You are on the CC list for the bug.