This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[2/3] RFC: *stopped and CLI commands

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.


2011-11-16  Tom Tromey  <>

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

>From 9554d74f7a6b4b0db7f416b970ae94f55e4e8aa0 Mon Sep 17 00:00:00 2001
From: Tom Tromey <>
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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]