Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: [2/3] RFC: *stopped and CLI commands
Date: Wed, 16 Nov 2011 20:00:00 -0000	[thread overview]
Message-ID: <m3sjlnhm75.fsf@fleche.redhat.com> (raw)

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


             reply	other threads:[~2011-11-16 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 20:00 Tom Tromey [this message]
2011-11-22 15:08 ` Pedro Alves
2011-11-22 20:05   ` Tom Tromey
2011-11-22 20:48     ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sjlnhm75.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox