Re: starting gdb/mi from FE

Daniel Jacobowitz
2006-06-06T03:16:46Z

On Mon, Jun 05, 2006 at 09:56:21PM -0400, Bob Rossi wrote:
> > Would -interpreter-list and -interpreter-set do it for you?
> >
> > I thought there already was a "set interp", but it seems I was
> > mistaken.
>
> Well, I'm not sure. My initial guess is no. Nick, please check this part
> out also, especially in regards to your -mi-version command.
>
> If GDB successfully starts with a -i=miN or just using the CLI and
> hoping to switch to MI, then GDB is allowed to execute an arbitrary
> number of commands before the FE can issue even a single command.
> At least, in the CLI mode this is true if the user has commands in
> .gdbinit.
>
> I really can't afford to recieve a single MI output commadn before I
> determine what generated parser I am going to use. So, I'll be stuck
> starting GDB N times :(

To avoid .gdbinit, start gdb with -nx. If you want, then source
.gdbinit or $HOME/.gdbinit yourself. You'll have to duplicate the
search for gdbinit files, but it's not as if that's a big deal.

As for whether you can parse the response of -interpreter-list, I don't
think there's any point in planning for that sort of drastic change to
the protocol. We're talking about selecting a version of MI; all
versions of MI are supposed to follow more or less the same formats.

--
Daniel Jacobowitz
CodeSourcery