This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: the fullname in MI
- From: Bob Rossi <bob at brasko dot net>
- To: Midnight Xiong <midnight dot xiong at gmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 21 Jun 2005 18:03:03 -0400
- Subject: Re: the fullname in MI
- References: <7f89a3ea050621145727f72dad@mail.gmail.com> <7f89a3ea05062114585b8e320b@mail.gmail.com>
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