GDB and GDB/MI different reponses....

Pedro Alves
Thu Apr 4 09:35:00 GMT 2013

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

More information about the Gdb mailing list