This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20487] Thread sync broken between mi and cli with new-ui command
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 18 Aug 2016 16:02:24 +0000
- Subject: [Bug gdb/20487] Thread sync broken between mi and cli with new-ui command
- Auto-submitted: auto-generated
- References: <bug-20487-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20487
--- Comment #9 from Pedro Alves <palves at redhat dot com> ---
I see. From a quick skim (reading patches in bugzilla sucks), I think the
observer notification calls would be much clearer if you replace the two
boolean arguments with an enum or enum flags (common/enum-flags.h).
+ if (ptid_equal (inferior_ptid, null_ptid))
+ return;
+ else
+ tp = inferior_thread ();
+
+ /* The thread is mandatory. */
+ if (tp == NULL)
+ return;
this is redundant, because inferior_thread never returns NULL.
I'd drop the else:
if (ptid_equal (inferior_ptid, null_ptid))
return;
tp = inferior_thread ();
+ current_ui->prompt_state = PROMPT_NEEDED;
+ display_gdb_prompt (NULL);
+ }
Doesn't look like these work correctly when the UI was in sync mode?
E.g.,:
- Do "continue" in the console. Since that was a sync command, the console
doesn't prompt until the target stops.
- Select another thread in the MI UI.
- We display the prompt in the console? (and input is disabled..)
--
You are receiving this mail because:
You are on the CC list for the bug.