From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: ac131313@cygnus.com Cc: gdb-patches@sourceware.cygnus.com Subject: Re: [patch] Add -i=mi0 as an interpreter Date: Tue, 19 Jun 2001 02:00:00 -0000 Message-id: <200106190901.MAA07858@is.elta.co.il> References: <3B2E405A.7000500@cygnus.com> X-SW-Source: 2001-06/msg00348.html > Date: Mon, 18 Jun 2001 13:54:34 -0400 > From: Andrew Cagney > > 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?