This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] ui_out_is_mi_like_p(); Was: [patch] Add -i=mi0 as an interpreter
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfc] ui_out_is_mi_like_p(); Was: [patch] Add -i=mi0 as an interpreter
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 5 Jul 2001 09:55:00 +0300 (IDT)
- cc: gdb-patches at sourceware dot cygnus dot com
On Wed, 4 Jul 2001, Andrew Cagney wrote:
> > Why can't this strncmp be done in one place and then saved in some
> > variable? If you do need to use strncmp all over the place, then I
> > can't say I care to see the magical constants "mi" and 2 every time
> > you do ;-)
>
> The attached patch replaces:
>
> > ! if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
> >
>
> with:
>
> if (ui_out_is_mi_like_p (uiout))
I'm happy now, thanks ;-)
> + /* HACK: Some code in core GDB is currently looks at the output
This sentence should be fixed.