Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [2/3] RFC: *stopped and CLI commands
@ 2011-11-16 20:00 Tom Tromey
  2011-11-22 15:08 ` Pedro Alves
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2011-11-16 20:00 UTC (permalink / raw)
  To: gdb-patches

I noticed while working on the PR that if you type "run" to an MI-mode
gdb, then the *stopped notification will not have any 'reason' field, or
other fields emitted by the print_it method.

The fix is simple: call bpstat_print at the right place in MI.
There is already a little special case in this code for printing the
frame, so I think a bit more here doesn't hurt.

The test case is in the next patch.

Tom

2011-11-16  Tom Tromey  <tromey@redhat.com>

	* mi/mi-interp.c (mi_on_normal_stop): Call bpstat_print.

From 9554d74f7a6b4b0db7f416b970ae94f55e4e8aa0 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@redhat.com>
Date: Tue, 15 Nov 2011 14:35:23 -0700
Subject: [PATCH 2/3] make *stopped show reason for CLI commands as well

---
 gdb/ChangeLog      |    4 ++++
 gdb/mi/mi-interp.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 805e3f8..2aec1c7 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -429,6 +429,7 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame)
 	  struct ui_out *saved_uiout = current_uiout;
 
 	  current_uiout = mi_uiout;
+	  bpstat_print (bs);
 	  print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
 	  current_uiout = saved_uiout;
 	}
-- 
1.7.6.4


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

end of thread, other threads:[~2011-11-22 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 20:00 [2/3] RFC: *stopped and CLI commands Tom Tromey
2011-11-22 15:08 ` Pedro Alves
2011-11-22 20:05   ` Tom Tromey
2011-11-22 20:48     ` Pedro Alves

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