This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] Add -i=mi0 as an interpreter
- To: ac131313 at cygnus dot com
- Subject: Re: [patch] Add -i=mi0 as an interpreter
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Tue, 19 Jun 2001 12:01:44 +0300 (IDT)
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <3B2E405A.7000500@cygnus.com>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> Date: Mon, 18 Jun 2001 13:54:34 -0400
> From: Andrew Cagney <ac131313@cygnus.com>
>
> This patch gets GDB to accept -i=mi and -i=mi0 (and lets not mention
> -i=mi1 :-) as an MI interpreter.
We must update gdb.texinfo to reflect this change. It currently
documents only -i=mi.
> Most of it is straight forward. The
> nasty bit is where I s/strcmp/strncmp/ in breakpoint.c and infrun.c.
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 ;-)
> ! if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
> Those strncmp()'s will eventually go away but that involves more work again.
What would it take to do that now?