From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17569 invoked by alias); 7 Mar 2014 01:10:45 -0000 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 Received: (qmail 17558 invoked by uid 89); 7 Mar 2014 01:10:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Mar 2014 01:10:43 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s271Afba017166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Mar 2014 20:10:41 -0500 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s271Aej4011362 for ; Thu, 6 Mar 2014 20:10:41 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v3 0/5] Fix lost events, and handle multiple step-overs. Date: Fri, 07 Mar 2014 01:10:00 -0000 Message-Id: <1394154640-14053-1-git-send-email-palves@redhat.com> X-SW-Source: 2014-03/txt/msg00166.txt.bz2 Here's v3. This version mainly addresses Doug's review of patch 2 of v2. As the rest of the series would no longer apply and one patch needed a minor corresponding tweak, I'm resending it all. v2 was here: https://sourceware.org/ml/gdb-patches/2014-03/msg00128.html v1 was here: https://sourceware.org/ml/gdb-patches/2014-02/msg00761.html. What remains is related to GDB losing events - breakpoints and watchpoints - in some situations, about teaching GDB that it might need to step over breakpoints in multiple threads. One nice side effect of patch #2 is that GDB no longer removes/inserts _all_ breakpoints when stepping over one. GDB after that only removes the breakpoint being stepped over. This eliminates a lot of z0/Z0 RSP traffic if you have a lot of breakpoints, and have a conditional or thread-specific breakpoint constantly triggering and not causing a user-visible stop. This changes heavily core run control code, which affects software single-step targets too. For more comfortable development and testing, I actually hacked on this against my software single-step on x86 branch first. Tested on x86_64 Fedora 17, against pristine mainline, and against a series that implements software single-step on x86-64. For convenience, you can find this series at: git@github.com:palves/gdb.git fix_a_bunch_of_run_control_bugs_v3 and with software single-step on x86 on top: git@github.com:palves/gdb.git fix_a_bunch_of_run_control_bugs_v3_sss In absence of barring comments, I plan to push this in soon. Changes in v3: - Polish patch for PR breakpoints/7143, in response to Doug's review. Changes in v2: - Two patches of v1 applied. - Order of some of the remaining patches changed. - Bugs that exposed were fixed. - One test moved to a different patch and got extended to cover another scenario gdb was mishandling and this series fixes. - Yao's review comments to v1's tests (to date) are addressed. - Software single-step breakpoints are not longer converted to real breakpoints. Pedro Alves (5): Fix missing breakpoint/watchpoint hits, eliminate deferred_step_ptid. PR breakpoints/7143 - Watchpoint does not trigger when first set Fix for even more missed events; eliminate thread-hop code. Handle multiple step-overs. Make signal-while-stepping-over-bp-other-thread.exp run against remote targets too. gdb/breakpoint.c | 25 +- gdb/breakpoint.h | 13 + gdb/inferior.h | 6 + gdb/infrun.c | 765 ++++++++++----------- gdb/testsuite/gdb.base/watchpoint.exp | 13 +- gdb/testsuite/gdb.cp/annota2.exp | 3 - gdb/testsuite/gdb.cp/annota3.exp | 3 - gdb/testsuite/gdb.threads/multiple-step-overs.c | 105 +++ gdb/testsuite/gdb.threads/multiple-step-overs.exp | 80 +++ .../signal-while-stepping-over-bp-other-thread.c | 2 + .../signal-while-stepping-over-bp-other-thread.exp | 16 +- .../gdb.threads/step-over-lands-on-breakpoint.c | 65 ++ .../gdb.threads/step-over-lands-on-breakpoint.exp | 62 ++ .../gdb.threads/step-over-trips-on-watchpoint.c | 67 ++ .../gdb.threads/step-over-trips-on-watchpoint.exp | 90 +++ 15 files changed, 877 insertions(+), 438 deletions(-) create mode 100644 gdb/testsuite/gdb.threads/multiple-step-overs.c create mode 100644 gdb/testsuite/gdb.threads/multiple-step-overs.exp create mode 100644 gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c create mode 100644 gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp create mode 100644 gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c create mode 100644 gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp -- 1.7.11.7