From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24607 invoked by alias); 10 Sep 2008 00:32:26 -0000 Received: (qmail 24597 invoked by uid 22791); 10 Sep 2008 00:32:25 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 Sep 2008 00:31:36 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 1FB09320B38 for ; Wed, 10 Sep 2008 00:31:52 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [173.8.135.205]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP for ; Wed, 10 Sep 2008 00:31:51 +0000 (UTC) Received: from silver64.hq2.avtrex.com ([192.168.7.15]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 9 Sep 2008 17:31:33 -0700 Message-ID: <48C71565.3050601@avtrex.com> Date: Wed, 10 Sep 2008 00:32:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [Patch] Use resume instead of target_resume when stepping over watchpoint. Content-Type: multipart/mixed; boundary="------------090801060202030701060501" X-IsSubscribed: yes 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: 2008-09/txt/msg00203.txt.bz2 This is a multi-part message in MIME format. --------------090801060202030701060501 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 929 In handle_inferior_event() when stepping over a watch point currently we issue target_resume(). This only works on architectures that have hardware single step support. For gdbarch_software_single_step_p() systems (like MIPS), we need to insert a single step breakpoint instead. The fix is to call resume() as it does the right thing already. I also added an assert that inferior_ptid == ecs->ptid to be sure that resume() was stepping the proper thread. This is essentially the change requested by Daniel in: http://sourceware.org/ml/gdb-patches/2008-04/msg00443.html This change is a prerequisite for my forthcoming MIPS hardware watch patch. Tested on x86_64-pc-linux-gnu as well as mipsel-linux (in conjunction with the MIPS hardware watch patch). OK to commit? 2008-09-09 David Daney * infrun.c (handle_inferior_event): Call resume instead of target_resume when stepping over watchpoint. --------------090801060202030701060501 Content-Type: text/plain; name="infrun.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="infrun.patch" Content-length: 715 Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.316 diff -u -p -r1.316 infrun.c --- infrun.c 8 Sep 2008 22:10:20 -0000 1.316 +++ infrun.c 9 Sep 2008 23:37:09 -0000 @@ -2472,7 +2472,8 @@ targets should add new threads to the th if (!HAVE_STEPPABLE_WATCHPOINT) remove_breakpoints (); registers_changed (); - target_resume (ecs->ptid, 1, TARGET_SIGNAL_0); /* Single step */ + gdb_assert (ptid_equal (inferior_ptid, ecs->ptid)); + resume (1, TARGET_SIGNAL_0); /* Single step */ waiton_ptid = ecs->ptid; if (HAVE_STEPPABLE_WATCHPOINT) infwait_state = infwait_step_watch_state; --------------090801060202030701060501--