This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Filename with "./" in breakpoint command
On Sat, Dec 03, 2005 at 04:54:54PM +0200, Eli Zaretskii wrote:
> > Date: Sat, 3 Dec 2005 09:21:49 -0500
> > From: Bob Rossi <bob@brasko.net>
> > Cc: Vladimir Prus <ghost@cs.msu.su>, gdb@sources.redhat.com
> >
> > > 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?
>
> Yes, there is a better way: type "info sources" inside GDB.
O, of course:
(gdb) info sources
/home/bob/tmp/tmp/tmp/tmp/one/uut.c,
/home/bob/tmp/tmp/tmp/tmp/two/uut.c,
/home/bob/tmp/tmp/tmp/tmp/two/main.c
-file-list-exec-source-files
^done,files=[{file="uut.c",fullname="/home/bob/tmp/tmp/tmp/tmp/one/uut.c"},
{file="uut.c",fullname="/home/bob/tmp/tmp/tmp/tmp/two/uut.c"},
{file="main.c",fullname="/home/bob/tmp/tmp/tmp/tmp/two/main.c"}]
Bob Rossi