From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13836 invoked by alias); 8 May 2012 14:15:48 -0000 Received: (qmail 13815 invoked by uid 22791); 8 May 2012 14:15:47 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 May 2012 14:15:34 +0000 From: "qiyao at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/13860] Fail in gdb.mi/mi-solib.exp in async mode Date: Tue, 08 May 2012 14:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qiyao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: qiyao at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00094.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13860 --- Comment #5 from Yao Qi 2012-05-08 14:15:17 UTC --- OK, I've drafted one patch, but not tested yet. Will start regression test for it. gdb: 2012-05-08 Yao Qi Fix PR mi/13860. * mi/mi-interp.c (mi_on_normal_stop): Print frame unconditionally. --- gdb/mi/mi-interp.c | 28 +++++++++++++--------------- 1 files changed, 13 insertions(+), 15 deletions(-) diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index daae480..1a2f266 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -438,26 +438,24 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame) if (print_frame) { int core; + struct target_waitstatus last; + ptid_t last_ptid; + struct ui_out *saved_uiout = NULL; + int current_uiout_is_not_mi = (current_uiout != mi_uiout); - if (current_uiout != mi_uiout) - { - /* The normal_stop function has printed frame information - into CLI uiout, or some other non-MI uiout. There's no - way we can extract proper fields from random uiout - object, so we print the frame again. In practice, this - can only happen when running a CLI command in MI. */ - struct ui_out *saved_uiout = current_uiout; - struct target_waitstatus last; - ptid_t last_ptid; + get_last_target_status (&last_ptid, &last); + if (current_uiout_is_not_mi) + { + saved_uiout = current_uiout; current_uiout = mi_uiout; + } - get_last_target_status (&last_ptid, &last); - bpstat_print (bs, last.kind); + bpstat_print (bs, last.kind); + print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC); - print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC); - current_uiout = saved_uiout; - } + if (current_uiout_is_not_mi) + current_uiout = saved_uiout; ui_out_field_int (mi_uiout, "thread-id", pid_to_thread_id (inferior_ptid)); -- 1.7.0.4 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.