This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] Add -i=mi0 as an interpreter


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]