Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Add -i=mi0 as an interpreter
@ 2001-06-18 10:54 Andrew Cagney
  2001-06-19  2:00 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2001-06-18 10:54 UTC (permalink / raw)
  To: gdb-patches

Hello,

This patch gets GDB to accept -i=mi and -i=mi0 (and lets not mention 
-i=mi1 :-) as an MI interpreter.  Most of it is straight forward.  The 
nasty bit is where I s/strcmp/strncmp/ in breakpoint.c and infrun.c. 
Those strncmp()'s will eventually go away but that involves more work again.

The motivation behind this patch is to provide a migration path from the 
never enabled existing MI interface to the finally enabled one.

	Andrew


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Add -i=mi0 as an interpreter
  2001-06-18 10:54 [patch] Add -i=mi0 as an interpreter Andrew Cagney
@ 2001-06-19  2:00 ` Eli Zaretskii
  2001-06-19 12:47   ` Andrew Cagney
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eli Zaretskii @ 2001-06-19  2:00 UTC (permalink / raw)
  To: ac131313; +Cc: gdb-patches

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Add -i=mi0 as an interpreter
  2001-06-19  2:00 ` Eli Zaretskii
@ 2001-06-19 12:47   ` Andrew Cagney
  2001-07-04 14:03   ` [rfa/doc] Mention -i=mi0; Was: " Andrew Cagney
  2001-07-04 15:34   ` [rfc] ui_out_is_mi_like_p(); " Andrew Cagney
  2 siblings, 0 replies; 9+ messages in thread
From: Andrew Cagney @ 2001-06-19 12:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

> We must update gdb.texinfo to reflect this change.  It currently
> documents only -i=mi.

Ok.  It turns out I also need to juggle the file names (DOS 8.3).

> 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 ;-)



True. While still not good will at least be consistent.  Perhaps I'll 
call the function mi_out_p_but_i_wish_this_hack_would_just_go_away() :-) 
(deprecated_mi_out_p()).

	Andrew



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [rfa/doc] Mention -i=mi0; Was: [patch] Add -i=mi0 as an interpreter
  2001-06-19  2:00 ` Eli Zaretskii
  2001-06-19 12:47   ` Andrew Cagney
@ 2001-07-04 14:03   ` Andrew Cagney
  2001-07-04 23:52     ` Eli Zaretskii
  2001-07-04 15:34   ` [rfc] ui_out_is_mi_like_p(); " Andrew Cagney
  2 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2001-07-04 14:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

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


The attatched patch mentions -i=mi, -i=mi0 and even -i=mi1.  Ok?

	Andrew




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [rfc] ui_out_is_mi_like_p(); Was: [patch] Add -i=mi0 as an interpreter
  2001-06-19  2:00 ` Eli Zaretskii
  2001-06-19 12:47   ` Andrew Cagney
  2001-07-04 14:03   ` [rfa/doc] Mention -i=mi0; Was: " Andrew Cagney
@ 2001-07-04 15:34   ` Andrew Cagney
  2001-07-04 23:53     ` Eli Zaretskii
  2 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2001-07-04 15:34 UTC (permalink / raw)
  To: Eli Zaretskii, gdb-patches

> 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 <dmj+@andrew.cmu.edu>
To: Mark Kettenis <kettenis@science.uva.nl>
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> <s3izoakgy74.fsf@soliton.wins.uva.nl>
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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfa/doc] Mention -i=mi0; Was: [patch] Add -i=mi0 as an interpreter
  2001-07-04 14:03   ` [rfa/doc] Mention -i=mi0; Was: " Andrew Cagney
@ 2001-07-04 23:52     ` Eli Zaretskii
  2001-07-05 21:06       ` Andrew Cagney
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2001-07-04 23:52 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Wed, 4 Jul 2001, Andrew Cagney wrote:

> The attatched patch mentions -i=mi, -i=mi0 and even -i=mi1.  Ok?

It's okay, but:

> ! @samp{--interpreter=mi} (or @samp{--interpreter=mi1}) causes
> ! @value{GDBN} to use the @dfn{gdbmi interface} (@pxref{GDB/MI, , The
> ! @sc{gdb/mi} Interface}). The older @dfn{gdbmi interface} included in
> ! @value{GDBN} version 5.0 can be selected with @samp{--interpreter=mi0}.

Please don't use @dfn{gdbmi interface} more than once in the same
section.  @dfn is for introducing new terms; once you've introduced
it, it shouldn't be needed to do that again in the next sentence.

Also, I believe we were saying gdb/mi all over the place, not gdbmi.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] ui_out_is_mi_like_p(); Was: [patch] Add -i=mi0 as an interpreter
  2001-07-04 15:34   ` [rfc] ui_out_is_mi_like_p(); " Andrew Cagney
@ 2001-07-04 23:53     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2001-07-04 23:53 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfa/doc] Mention -i=mi0; Was: [patch] Add -i=mi0 as an interpreter
  2001-07-04 23:52     ` Eli Zaretskii
@ 2001-07-05 21:06       ` Andrew Cagney
  2001-07-06  1:16         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2001-07-05 21:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

>> ! @samp{--interpreter=mi} (or @samp{--interpreter=mi1}) causes
>> ! @value{GDBN} to use the @dfn{gdbmi interface} (@pxref{GDB/MI, , The
>> ! @sc{gdb/mi} Interface}). The older @dfn{gdbmi interface} included in
>> ! @value{GDBN} version 5.0 can be selected with @samp{--interpreter=mi0}.
> 
> 
> Please don't use @dfn{gdbmi interface} more than once in the same
> section.  @dfn is for introducing new terms; once you've introduced
> it, it shouldn't be needed to do that again in the next sentence.


Ah!


> Also, I believe we were saying gdb/mi all over the place, not gdbmi.


Cut/paste problem.  Thanks.

I've checked in the attached.

	Andrew




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfa/doc] Mention -i=mi0; Was: [patch] Add -i=mi0 as an interpreter
  2001-07-05 21:06       ` Andrew Cagney
@ 2001-07-06  1:16         ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2001-07-06  1:16 UTC (permalink / raw)
  To: ac131313; +Cc: gdb-patches

> Date: Fri, 06 Jul 2001 00:05:53 -0400
> From: Andrew Cagney <ac131313@cygnus.com>

This is fine; thanks.

> 2001-07-04  Andrew Cagney  <ac131313@redhat.com>
> 
> 	* gdb.texinfo (Mode Options): Mention the mi0 and mi1
> 	interpreters.
> 
> Index: gdb.texinfo
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
> retrieving revision 1.43
> diff -p -r1.43 gdb.texinfo
> *** gdb.texinfo	2001/06/17 07:00:34	1.43
> --- gdb.texinfo	2001/07/06 04:04:45
> *************** Run using @var{device} for your program'
> *** 1045,1053 ****
>   @cindex @code{--interpreter}
>   Use the interpreter @var{interp} for interface with the controlling
>   program or device.  This option is meant to be set by programs which
> ! communicate with @value{GDBN} using it as a back end.  For example,
> ! @samp{--interpreter=mi} causes @value{GDBN} to use the @dfn{gdbmi
> ! interface} (@pxref{GDB/MI, , The @sc{gdb/mi} Interface}).
>   
>   @item -write
>   @cindex @code{--write}
> --- 1045,1056 ----
>   @cindex @code{--interpreter}
>   Use the interpreter @var{interp} for interface with the controlling
>   program or device.  This option is meant to be set by programs which
> ! communicate with @value{GDBN} using it as a back end.
> ! 
> ! @samp{--interpreter=mi} (or @samp{--interpreter=mi1}) causes
> ! @value{GDBN} to use the @dfn{gdb/mi interface} (@pxref{GDB/MI, , The
> ! @sc{gdb/mi} Interface}). The older @sc{gdb/mi} interface, included in
> ! @value{GDBN} version 5.0 can be selected with @samp{--interpreter=mi0}.
>   
>   @item -write
>   @cindex @code{--write}
> 
> --------------030009080508050407020900--
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-07-06  1:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-18 10:54 [patch] Add -i=mi0 as an interpreter Andrew Cagney
2001-06-19  2:00 ` Eli Zaretskii
2001-06-19 12:47   ` Andrew Cagney
2001-07-04 14:03   ` [rfa/doc] Mention -i=mi0; Was: " Andrew Cagney
2001-07-04 23:52     ` Eli Zaretskii
2001-07-05 21:06       ` Andrew Cagney
2001-07-06  1:16         ` Eli Zaretskii
2001-07-04 15:34   ` [rfc] ui_out_is_mi_like_p(); " Andrew Cagney
2001-07-04 23:53     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox