This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Filename with "./" in breakpoint command
- From: Bob Rossi <bob at brasko dot net>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Vladimir Prus <ghost at cs dot msu dot su>, gdb at sources dot redhat dot com
- Date: Sat, 3 Dec 2005 09:21:49 -0500
- Subject: Re: Filename with "./" in breakpoint command
- References: <dms4je$qit$1@sea.gmane.org> <u4q5qs1rq.fsf@gnu.org>
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