This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix target remote non-stop regressions
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 14 Mar 2010 17:37:32 +0000
- Subject: Fix target remote non-stop regressions
I've applied the patch below to fix these non-stop
regressions, that I introduced a couple of weeks ago:
-PASS: gdb.mi/mi-nonstop-exit.exp: finished exec continue
-PASS: gdb.mi/mi-nonstop-exit.exp: breakpoint at main
-PASS: gdb.mi/mi-nonstop-exit.exp: mi runto main
-PASS: gdb.mi/mi-nonstop-exit.exp: finished exec continue (2)
+FAIL: gdb.mi/mi-nonstop-exit.exp: finished exec continue (unknown output after running)
+ERROR: Delete all breakpoints in mi_delete_breakpoints (timeout)
+ERROR: tcl error sourcing ../../../src/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp.
+ERROR: Dir reinitialization failed (timeout)
...
+PASS: gdb.mi/mi-nsmoribund.exp: resume all, program exited normally
-FAIL: gdb.mi/mi-nsmoribund.exp: resume all, waiting for program exit (timeout)
I've no idea how I didn't see this before.
The log shows the problem:
(gdb)
~"../../src/gdb/infrun.c:6329: internal-error: ptid_match: Assertion `!ptid_equal (ptid, minus_one_ptid) && !ptid_equal (ptid, null_ptid) && !ptid_is_pid (ptid)' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? "
~"(y or n) "
Thread <0> executing
Thread <1> executing
Thread <2> executing
Thread <3> executing
Child exited with status 0
GDBserver exiting
This is because in the calls that assert, PTID is a
pid ptid - it's the process exit event's ptid.
I had added the extra assertion that I'm now removing,
when I moved ptid_match from linux-nat.c to common code.
Turns out not to be a good idea. This
whole assert is just trying to catch easy mistakes from
happening (and it has indeed caught me a couple before);
since this particular check trips on valid uses, it's
not viable to have it.
--
Pedro Alves
2010-03-14 Pedro Alves <pedro@codesourcery.com>
gdb/
* infrun.c (ptid_match): Don't assert that PTID is not a pid ptid.
---
gdb/infrun.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: src/gdb/infrun.c
===================================================================
--- src.orig/gdb/infrun.c 2010-03-14 17:08:54.000000000 +0000
+++ src/gdb/infrun.c 2010-03-14 17:15:56.000000000 +0000
@@ -6325,8 +6325,7 @@ ptid_match (ptid_t ptid, ptid_t filter)
/* Since both parameters have the same type, prevent easy mistakes
from happening. */
gdb_assert (!ptid_equal (ptid, minus_one_ptid)
- && !ptid_equal (ptid, null_ptid)
- && !ptid_is_pid (ptid));
+ && !ptid_equal (ptid, null_ptid));
if (ptid_equal (filter, minus_one_ptid))
return 1;