public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "qiyao at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-13860-4717-GyGaamvLN2@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-13860-4717@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=13860 --- Comment #5 from Yao Qi <qiyao at gcc dot gnu.org> 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 <yao@codesourcery.com> 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.
next prev parent reply other threads:[~2012-05-08 14:15 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-16 8:12 [Bug testsuite/13860] New: Fail in gdb.mi/mi-solib.exp when displaced stepping is on qiyao at gcc dot gnu.org 2012-03-16 10:14 ` [Bug testsuite/13860] " palves at redhat dot com 2012-03-16 10:46 ` [Bug testsuite/13860] Fail in gdb.mi/mi-solib.exp in async mode qiyao at gcc dot gnu.org 2012-03-16 10:53 ` palves at redhat dot com 2012-05-08 13:17 ` qiyao at gcc dot gnu.org 2012-05-08 13:22 ` palves at redhat dot com 2012-05-08 14:15 ` qiyao at gcc dot gnu.org [this message] 2012-05-08 14:25 ` palves at redhat dot com 2012-05-08 14:40 ` qiyao at gcc dot gnu.org 2012-05-09 8:04 ` qiyao at gcc dot gnu.org 2012-05-09 14:51 ` [Bug gdb/13860] " palves at redhat dot com 2012-05-09 17:25 ` palves at redhat dot com 2014-05-21 22:17 ` cvs-commit at gcc dot gnu.org 2014-05-21 22:36 ` cvs-commit at gcc dot gnu.org 2014-05-21 22:43 ` palves at redhat dot com 2014-05-22 10:54 ` [Bug gdb/13860] Different sync vs async MI output palves at redhat dot com 2014-05-22 10:55 ` palves at redhat dot com 2014-05-29 12:16 ` cvs-commit at gcc dot gnu.org 2014-05-29 12:46 ` palves at redhat dot com
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=bug-13860-4717-GyGaamvLN2@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).