From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30707 invoked by alias); 8 Sep 2010 17:52:07 -0000 Received: (qmail 30681 invoked by uid 22791); 8 Sep 2010 17:52:06 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.17.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Sep 2010 17:52:00 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.1/8.13.1) with ESMTP id o88Hpv1O007972 for ; Wed, 8 Sep 2010 17:51:57 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o88HpvSZ4128966 for ; Wed, 8 Sep 2010 19:51:57 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o88HpvET019336 for ; Wed, 8 Sep 2010 19:51:57 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o88Hpufw019331; Wed, 8 Sep 2010 19:51:56 +0200 Message-Id: <201009081751.o88Hpufw019331@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 08 Sep 2010 19:51:56 +0200 Subject: [commit] Re: Fixes for a couple of infrun bugs (thread hop, revert to step thread). To: pedro@codesourcery.com (Pedro Alves) Date: Wed, 08 Sep 2010 18:18:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <201008161952.53200.pedro@codesourcery.com> from "Pedro Alves" at Aug 16, 2010 07:52:52 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00182.txt.bz2 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