This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB and GDB/MI different reponses....
- From: Pedro Alves <palves at redhat dot com>
- To: webquinty quinty <webquinty at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 04 Apr 2013 10:35:22 +0100
- Subject: Re: GDB and GDB/MI different reponses....
- References: <CAFTqdrNmXCMTaJ8vHngQ3n9WMQy98TUoT7JO4MEU0j=JmKJ+yg at mail dot gmail dot com> <CAFTqdrPKfdUH1qn0O5fB499uEPjs-_eecPd0GZFrc2M0S-f0GA at mail dot gmail dot com>
On 03/21/2013 04:30 PM, webquinty quinty wrote:
> Hello,
>
> As you known, with GDB it is possible to obtain debug information from
> executable.
>
> For example in GDB you can ask about type of var:
>
> -> whatis var
> <- type = unsigned char
>
> I just finished a frontend to extract debug information from a process
> using GDB/MI but the response is different than when I use GDB.
>
> For example, a struct called 'par' GDB return me type=param_typ but GDB/MI
> return me anonimous struct.
>
> Why?
This is the sort of question that is simply impossible to answer definitely
without having the binary in question, or even knowing exactly what you have
attempted. Please don't make us guess; be proactive. But in principle there
should be no difference.
I'd guess either you've used different GDBs for the CLI vs MI tests, or,
you have more than one 'par' in your program, and depending on current context
(what the current function/frame GDB has selected for inspecting) and perhaps
phase of the moon, you'll get one answer or the other.
--
Pedro Alves