This is the mail archive of the gdb@sources.redhat.com 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: the fullname in MI


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


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