This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI: full file name


On Mon, Nov 21, 2005 at 09:54:53AM -0500, Bob Rossi wrote:
> On Mon, Nov 21, 2005 at 05:53:06PM +0300, Vladimir Prus wrote:
> > On Monday 21 November 2005 17:45, Bob Rossi wrote:
> > > > 1. Can I get full file name in MI output somehow?
> > >
> > > -file-list-exec-source-file
> > 
> > Thanks. 
> > 
> > Is there any reason why I need separate MI command? Can't "*stopped" packet 
> > include full file name as well?
> 
> I believe this is in the works. Actually, this might already work with
> mi2 or latest CVS. Maybe someone else knows better. I've been very busy,
> and haven't had time to keep up.

Looks like it's been done in 6.4:

drow@caradoc:~% gdb -i=mi ~/nevyn-home/debugging/printf 
~"GNU gdb 6.3.90_20051119-debian\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\"..."
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
~"\n"
(gdb) 
-break-insert main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08048394",func="main",file="debugging/printf.c",line="6",times="0"}
(gdb) 
-exec-run
^running
(gdb) 
&"warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4\n"
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048394",func="main",args=[{name="argc",value="1"},{name="argv",value="0xffffc4b4"}],file="debugging/printf.c",line="6"}
(gdb) 

And then again with appropriate "dir" so GDB can find the file:

-exec-run
^running
(gdb) 
&"warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4\n"
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048394",func="main",args=[{name="argc",value="1"},{name="argv",value="0xffffc974"}],file="debugging/printf.c",fullname="/home/drow/mnt/nevyn/home/drow/debugging/printf.c",line="6"}
(gdb) 

I didn't try 6.3.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]