From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26289 invoked by alias); 8 Jan 2010 16:54:53 -0000 Received: (qmail 26276 invoked by uid 22791); 8 Jan 2010 16:54:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Jan 2010 16:54:46 +0000 Received: (qmail 19836 invoked from network); 8 Jan 2010 16:54:44 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Jan 2010 16:54:44 -0000 From: Vladimir Prus To: Pedro Alves Subject: Re: RFC: fix race in multiexec case Date: Fri, 08 Jan 2010 16:54:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-14-generic-pae; KDE/4.3.2; i686; ; ) Cc: gdb-patches@sourceware.org References: <201001051126.58970.vladimir@codesourcery.com> <201001081709.55137.vladimir@codesourcery.com> <201001081423.35340.pedro@codesourcery.com> In-Reply-To: <201001081423.35340.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_SN2RLZejOxQqyIH" Message-Id: <201001081954.42276.vladimir@codesourcery.com> 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-01/txt/msg00179.txt.bz2 --Boundary-00=_SN2RLZejOxQqyIH Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 363 On Friday 08 January 2010 17:23:35 Pedro Alves wrote: > On Friday 08 January 2010 14:09:55, Vladimir Prus wrote: > > > What is the right way to regression test this? Do you think running testsuite with no special > > arguments is sufficient, or I need to try async/non-stop? > > Just the regular testing is fine. Thanks. Tested and checked in now. - Volodya --Boundary-00=_SN2RLZejOxQqyIH Content-Type: text/x-patch; charset="UTF-8"; name="final.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="final.diff" Content-length: 1327 Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.11212 diff -u -p -r1.11212 ChangeLog --- ChangeLog 8 Jan 2010 13:54:40 -0000 1.11212 +++ ChangeLog 8 Jan 2010 16:53:31 -0000 @@ -1,3 +1,9 @@ +2010-01-08 Vladimir Prus + + Fix multiexec race. + * infrun.c (handle_inferior_event): Use get_thread_regcache + with events ptid, not get_current_regcache. + 2009-01-08 Joel Brobecker GDB crash with empty executable name (MinGW). Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.423 diff -u -p -r1.423 infrun.c --- infrun.c 5 Jan 2010 20:55:18 -0000 1.423 +++ infrun.c 8 Jan 2010 16:53:31 -0000 @@ -3232,7 +3232,8 @@ targets should add new threads to the th if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP) { int thread_hop_needed = 0; - struct address_space *aspace = get_regcache_aspace (get_current_regcache ()); + struct address_space *aspace = + get_regcache_aspace (get_thread_regcache (ecs->ptid)); /* Check if a regular breakpoint has been hit before checking for a potential single step breakpoint. Otherwise, GDB will --Boundary-00=_SN2RLZejOxQqyIH--