Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] MI and MI2 should have identical behavior on -target-download  command
@ 2007-08-20 21:04 Maxim Grigoriev
  2007-08-21 12:16 ` Nick Roberts
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Grigoriev @ 2007-08-20 21:04 UTC (permalink / raw)
  To: gdb-patches, Pete MacLiesh, Marc Gauthier, Ross Morley

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

This patch has to be approved before I can commit it.

It fixes a small glitch in GDB MI. MI2 is a default. So
MI and MI2 should work identically. The MI2 being set as
a default is hard-coded in several places. I think one
place was missed:

    mi/mi-main.c::mi_load_progress().

Without this fix, MI "-target-download" command behaves
differently on MI versus MI2 not showing loading progress,
when "-i=mi2" is used.

GDB front-ends developers might want to stick with "-i=mi"
assuming they always use a default. It would be a bad idea
to force them to use explicit options like "-i=mi2".

-- Maxim



[-- Attachment #2: mi2_default_patch.diff --]
[-- Type: text/x-patch, Size: 785 bytes --]

2007-08-20  Maxim Grigoriev  <maxim2405@gmail.com>

	* mi/mi-main.c (mi_load_progress): Make MI and MI2 behave
	identically on -target-download command as long as MI2 is a default.

Index: gdb/mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.101
diff -u -r1.101 mi-main.c
--- gdb/mi/mi-main.c	10 Aug 2007 21:52:38 -0000	1.101
+++ gdb/mi/mi-main.c	20 Aug 2007 20:19:57 -0000
@@ -1465,7 +1465,8 @@
      of this function.  */
   saved_uiout = uiout;
 
-  if (current_interp_named_p (INTERP_MI))
+  if (current_interp_named_p (INTERP_MI)
+      || current_interp_named_p (INTERP_MI2))
     uiout = mi_out_new (2);
   else if (current_interp_named_p (INTERP_MI1))
     uiout = mi_out_new (1);

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

end of thread, other threads:[~2007-09-03 17:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-20 21:04 [PATCH] MI and MI2 should have identical behavior on -target-download command Maxim Grigoriev
2007-08-21 12:16 ` Nick Roberts
2007-08-21 13:28   ` Daniel Jacobowitz
2007-08-22  5:33     ` Nick Roberts
2007-08-22 11:09       ` Daniel Jacobowitz
2007-08-23  6:11         ` Nick Roberts
2007-08-23 11:48           ` Daniel Jacobowitz
2007-09-03 17:51     ` Daniel Jacobowitz
2007-08-21 17:43   ` Maxim Grigoriev

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