This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix a multiprocess/non-stop assertion.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 28 Mar 2009 00:56:46 +0000
- Subject: Fix a multiprocess/non-stop assertion.
I'm checking this in. In multi-process/non-stop mode (actually async mode),
and a process just exited, we were calling is_running when inferior_ptid
was null_ptid, which asserts. If inferior_ptid is null_ptid, something
did complete. This "set exec-done-display" command strikes me
as useless, but ...
--
Pedro Alves
2009-03-28 Pedro Alves <pedro@codesourcery.com>
* inf-loop.c (inferior_event_handler): Avoid calling is_running on
null inferior_ptid.
---
gdb/inf-loop.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: src/gdb/inf-loop.c
===================================================================
--- src.orig/gdb/inf-loop.c 2009-03-28 00:48:15.000000000 +0000
+++ src/gdb/inf-loop.c 2009-03-28 00:48:38.000000000 +0000
@@ -131,7 +131,10 @@ inferior_event_handler (enum inferior_ev
bpstat_do_actions ();
}
- if (!was_sync && !is_running (inferior_ptid) && exec_done_display_p)
+ if (!was_sync
+ && exec_done_display_p
+ && (ptid_equal (inferior_ptid, null_ptid)
+ || !is_running (inferior_ptid)))
printf_unfiltered (_("completed.\n"));
break;