interpreter_p && strcmp (interpreter_p, "mi") == 0

Fernando Nasser fnasser@redhat.com
Sun Jun 10 08:27:00 GMT 2001


Andrew Cagney wrote:
> 
> Hello,
> 
> In going over the MI sources I've come across this little gem (it is
> scattered through out both breakpoint.c and infrun.c).  I'm now trying
> to remember what discussion went on about it back when it was introduced
>   and how to now go back and fix it (I know there was some but it would
> have been Cygnus internal :-( ).
> 
> Briefly, there are a number of functions for which the behavour changes
> when the MI output is enabled:
> 
>         o       extra information not part of
>                 the normal CLI output is added
> 
>         o       the output is made fixed
> 
> The reason I noticed this is because I was playing around with having
> ``-i=mi1'' for the old syntax and ``-i=mi'' for the final syntax.
> 
>         Andrew

The MI is not capable of generating output that was not also printed. 
This must have been added by someone trying to circumvent that.

As far as I can remember, the way I recommended that to be fixed was by
splitting the code that used to generate the console output into two
functions -- the actual task (libgdb function) and a CLI printing part.
Then, making the MI call the former would allow it to generate the
output in whatever way it wants.

This, of course, is more work and may be tricky in some cases, but it is
something that has to be done anyway so we get a UI-free libgdb.


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9



More information about the Gdb mailing list