From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19859 invoked by alias); 16 Nov 2011 20:00:56 -0000 Received: (qmail 19851 invoked by uid 22791); 16 Nov 2011 20:00:55 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Nov 2011 20:00:32 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAGK0We7025033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 16 Nov 2011 15:00:32 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAGK0WDO006694; Wed, 16 Nov 2011 15:00:32 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pAGK0VKq008322; Wed, 16 Nov 2011 15:00:31 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [2/3] RFC: *stopped and CLI commands Date: Wed, 16 Nov 2011 20:00:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00451.txt.bz2 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 * 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; } -- 1.7.6.4