Filename with "./" in breakpoint command
Bob Rossi
bob@brasko.net
Sat Dec 3 14:22:00 GMT 2005
On Sat, Dec 03, 2005 at 04:17:45PM +0200, Eli Zaretskii wrote:
> > From: Vladimir Prus <ghost@cs.msu.su>
> > Date: Sat, 03 Dec 2005 15:55:10 +0300
> >
> > $ ~/build/gdb-cvs/gdb/gdb tracepoints
> > GNU gdb 6.4.50.20051121-cvs
> > (gdb) b ./tracepoints.cpp:12
> > No source file named ./tracepoints.cpp.
> > Breakpoint 1 (./tracepoints.cpp:12) pending.
> > (gdb) b tracepoints.cpp:12
> > Breakpoint 2 at 0x80483c4: file tracepoints.cpp, line 12.
> > (gdb) quit
> > $ ls tracepoints.cpp
> > tracepoints.cpp
> >
> > It looks like leading "./" in file name confuses gdb. This "./" thing is
> > send by KDevelop in some cases.
>
> What are the actual source file names recorded in the debug info?
> Please show us that, and we will be able to reason whether this is a
> feature, a bug, or a missing feature.
Eli, I can reproduce this like this,
tmp/
one/
uut.c uut.h
two/
uut.c uut.h main.c
If I compile each file in there own directory with -g and then link in
directory two/ and then start GDB from there, the command
b uut.c:5 works for me and b ./uut.c:5 doesn't. If I compile
gcc -S uut.c in either directory, the assembly file says the name is
"uut.c". Is there a better way to tell you what the debug info says?
Bob Rossi
More information about the Gdb
mailing list