* the fullname in MI
[not found] <7f89a3ea050621145727f72dad@mail.gmail.com>
@ 2005-06-21 21:58 ` Midnight Xiong
2005-06-21 22:03 ` Bob Rossi
2005-06-21 22:34 ` Nick Roberts
0 siblings, 2 replies; 4+ messages in thread
From: Midnight Xiong @ 2005-06-21 21:58 UTC (permalink / raw)
To: gdb
Hi,
I'm wondering, how can I get the fullname of source file in MI output?
For example,
^done,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x00401342",
func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d24c8"}],file="
test.c",line="11"}
For file="test.c", how can I determine the correct filename (with
absolute path)?
Thank you so much.
Best Regards,
Midnight.Xiong
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: the fullname in MI
2005-06-21 21:58 ` the fullname in MI Midnight Xiong
@ 2005-06-21 22:03 ` Bob Rossi
2005-06-21 22:34 ` Nick Roberts
1 sibling, 0 replies; 4+ messages in thread
From: Bob Rossi @ 2005-06-21 22:03 UTC (permalink / raw)
To: Midnight Xiong; +Cc: gdb
On Wed, Jun 22, 2005 at 06:58:41AM +0900, Midnight Xiong wrote:
> Hi,
> I'm wondering, how can I get the fullname of source file in MI output?
> For example,
> ^done,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x00401342",
> func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d24c8"}],file="
> test.c",line="11"}
>
> For file="test.c", how can I determine the correct filename (with
> absolute path)?
> Thank you so much.
You can either add a patch to GDB/MI that puts the fullname in the
breakpoint output, or you can call -file-list-exec-source-file (which
will tell you the fullname of the current source line), or you can call
-file-list-exec-source-files to get a list of all the filename/fullname
pairs that GDB knows about.
The first approach would be best and I could point you in the correct
direction.
Bob Rossi
^ permalink raw reply [flat|nested] 4+ messages in thread
* the fullname in MI
2005-06-21 21:58 ` the fullname in MI Midnight Xiong
2005-06-21 22:03 ` Bob Rossi
@ 2005-06-21 22:34 ` Nick Roberts
2005-06-22 5:33 ` Midnight Xiong
1 sibling, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2005-06-21 22:34 UTC (permalink / raw)
To: Midnight Xiong; +Cc: gdb
Midnight Xiong writes:
> Hi,
> I'm wondering, how can I get the fullname of source file in MI output?
> For example,
> ^done,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x00401342",
> func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d24c8"}],file="
> test.c",line="11"}
>
> For file="test.c", how can I determine the correct filename (with
> absolute path)?
> Thank you so much.
What version of GDB are you using? GDB in the CVS repository prints the
fullname since this change:
2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
Dennis Brueni <dennis@slickedit.com>
* stack.c (print_frame): In MI mode, output a fullname attribute
with the stack frame.
e.g
(gdb)
-exec-run
^running
(gdb)
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080484d9",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff794"}],file="myprog.c",fullname="/home/nick/myprog.c",line="49"}
(gdb)
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: the fullname in MI
2005-06-21 22:34 ` Nick Roberts
@ 2005-06-22 5:33 ` Midnight Xiong
0 siblings, 0 replies; 4+ messages in thread
From: Midnight Xiong @ 2005-06-22 5:33 UTC (permalink / raw)
To: Nick Roberts, Bob Rossi; +Cc: gdb
Fine. I used an old version. Temporarly, I can use -file-list-exec-source-files.
Thank Bob Rossi, Nick Roberts and others.
On 6/22/05, Nick Roberts <nickrob@snap.net.nz> wrote:
> Midnight Xiong writes:
> > Hi,
> > I'm wondering, how can I get the fullname of source file in MI output?
> > For example,
> > ^done,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x00401342",
> > func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d24c8"}],file="
> > test.c",line="11"}
> >
> > For file="test.c", how can I determine the correct filename (with
> > absolute path)?
> > Thank you so much.
>
> What version of GDB are you using? GDB in the CVS repository prints the
> fullname since this change:
>
>
> 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
> Dennis Brueni <dennis@slickedit.com>
>
> * stack.c (print_frame): In MI mode, output a fullname attribute
> with the stack frame.
>
> e.g
>
> (gdb)
> -exec-run
> ^running
> (gdb)
> *stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080484d9",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff794"}],file="myprog.c",fullname="/home/nick/myprog.c",line="49"}
> (gdb)
>
>
> Nick
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-22 5:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <7f89a3ea050621145727f72dad@mail.gmail.com>
2005-06-21 21:58 ` the fullname in MI Midnight Xiong
2005-06-21 22:03 ` Bob Rossi
2005-06-21 22:34 ` Nick Roberts
2005-06-22 5:33 ` Midnight Xiong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).