This is the mail archive of the gdb@sourceware.cygnus.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]

RE: Is there an example of how to use the gdb/mi interface ?


nm is fine for getting the base address of a structure, what I am after is finding the address of an
element of a structure. In gdb I would type "print &data.input" and get 0x12341234 in response.

The example I was looking for is a program that attached/launched/loaded gbd and performed some sort
of simple query using the MI interface.

Thanks in advance.

> -----Original Message-----
> From: gdb-owner@sourceware.cygnus.com
> [mailto:gdb-owner@sourceware.cygnus.com]On Behalf Of Andrew Cagney
> Sent: 15 May 2000 01:18
> To: Robert
> Cc: gdb@sourceware.cygnus.com
> Subject: Re: Is there an example of how to use the gdb/mi interface ?
>
>
> > Robert wrote:
> >
> > Does anyone have an example of how to use the gdb/mi
> interface ? All I
> > want to do is to get the address of a variable as gdb already knows
> > how to do this then why not use it.
>
> Examples of MI in use can be found in the documentation:
>
> http://sourceware.cygnus.com/gdb/onlinedocs/gdb_20.html#SEC191
>
> If all your after is the address of a global/static symbol
> then you may
> find GDB/MI overkill. NM is likely to be sufficient.
>
> 	Andrew
>


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