From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Eli Zaretskii , gdb-patches@sourceware.cygnus.com Subject: [rfc] ui_out_is_mi_like_p(); Was: [patch] Add -i=mi0 as an interpreter Date: Wed, 04 Jul 2001 15:34:00 -0000 Message-id: <3B4399D4.1060302@cygnus.com> References: <3B2E405A.7000500@cygnus.com> <200106190901.MAA07858@is.elta.co.il> X-SW-Source: 2001-07/msg00066.html > 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 ;-) The attached patch replaces: > ! if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) > with: if (ui_out_is_mi_like_p (uiout)) it addresses the immedate concern and creates a name so horrible that no one will want to use it :-) Andrew >From dmj+@andrew.cmu.edu Wed Jul 04 15:41:00 2001 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] The MIPS/Linux port Date: Wed, 04 Jul 2001 15:41:00 -0000 Message-id: <20010704154043.A23475@nevyn.them.org> References: <20010704121952.A17445@nevyn.them.org> X-SW-Source: 2001-07/msg00067.html Content-length: 1034 On Wed, Jul 04, 2001 at 11:51:27PM +0200, Mark Kettenis wrote: > Looks like the MIPS port was started before a bit of reformatting of > the sources and conversion to ISO C took place. Please > > * Format the copyright notice at the beginning of the file as all > (most of) the other files, for example i386-linux-tdep.c. > > * Don't put a start on every line of multi-line comments. > > * Put two spaces after a full stop (.) in comments, even at the end > of the comment. Make the comments full senteces, including a full > stop at the end of them. > > * Wrap long comments. > > * Use ISO C prototypes and function definitions, e.g. > > int > get_longjmp_target (CORE_ADDR *pc) > { > > and > > static void fetch_core_registers (char *, unsigned, int, CORE_ADDR); > > (get rid of PARAMS). Thanks. I'll do these and repost it. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer