This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Re: Fixes for a couple of infrun bugs (thread hop, revert to step thread).
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedro at codesourcery dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 8 Sep 2010 19:51:56 +0200 (CEST)
- Subject: [commit] Re: Fixes for a couple of infrun bugs (thread hop, revert to step thread).
Pedro Alves wrote:
> On Monday 16 August 2010 19:40:47, Ulrich Weigand wrote:
> > Pedro Alves wrote:
> >
> > > Replacing the "next" by a "continue" should work. I've looked over the
> > > original description of the problem this is covering, and, that
> > > would still exercise the problem (which is gdb trying to step
> > > the other (main) thread with inferior_ptid still pointing at
> > > the thread that was being "next"ed, and in the process failing
> > > to remove breakpoints from memory because inferior_ptid pointed
> > > at an inferior thread.
> >
> > But isn't the code your patch changes under an if that's only true
> > if another thread is currently being stepped or nexted? If we just
> > do "continue" here, that's no longer the case, and the code wouldn't
> > be exercised at all ...
>
> That's also exercised by the other test my original patch added,
> IIRC (gdb.thread/thread-execl.exp). There were two bugs fixed by
> that patch. The specific bug the threxit-hop-specific.exp test is
> covering is the "failing to remove breakpoints" one.
OK, I've now committed the following patch.
Tested on armv7l-linux-gnueabi and i686-linux.
Thanks,
Ulrich
ChangeLog:
* gdb.threads/threxit-hop-specific.exp: Use "continue" instead
of "next" to proceed over pthread_exit call.
Index: gdb/testsuite/gdb.threads/threxit-hop-specific.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/threxit-hop-specific.exp,v
retrieving revision 1.2
diff -u -p -r1.2 threxit-hop-specific.exp
--- gdb/testsuite/gdb.threads/threxit-hop-specific.exp 1 Jan 2010 07:32:06 -0000 1.2
+++ gdb/testsuite/gdb.threads/threxit-hop-specific.exp 16 Aug 2010 19:05:38 -0000
@@ -52,7 +52,7 @@ gdb_test "break $bpthrline thread 2" \
set bpexitline [gdb_get_line_number "set exit breakpoint here"]
gdb_breakpoint "$bpexitline"
-gdb_test "next" \
+gdb_test "continue" \
".*set exit breakpoint here.*" \
"get past the thread specific breakpoint"
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com