From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24728 invoked by alias); 2 Dec 2008 04:32:35 -0000 Received: (qmail 24719 invoked by uid 22791); 2 Dec 2008 04:32:34 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Dec 2008 04:31:58 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id mB24VuQp018465 for ; Mon, 1 Dec 2008 20:31:56 -0800 Received: from localhost (ruffy.corp.google.com [172.18.118.116]) by wpaz33.hot.corp.google.com with ESMTP id mB24Vs6a001732 for ; Mon, 1 Dec 2008 20:31:55 -0800 Received: by localhost (Postfix, from userid 67641) id D72E81C7A0B; Mon, 1 Dec 2008 20:31:54 -0800 (PST) To: gdb-patches@sourceware.org Subject: [RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint Message-Id: <20081202043154.D72E81C7A0B@localhost> Date: Tue, 02 Dec 2008 04:32:00 -0000 From: dje@google.com (Doug Evans) 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-12/txt/msg00026.txt.bz2 Hi. While researching my prepare_to_proceed problem, I found this in handle_inferior_event. Just above this line: stepping_past_singlestep_breakpoint = 0; there's this: if (stepping_past_singlestep_breakpoint) { gdb_assert (singlestep_breakpoints_inserted_p); gdb_assert (ptid_equal (singlestep_ptid, ecs->ptid)); gdb_assert (!ptid_equal (singlestep_ptid, saved_singlestep_ptid)); stepping_past_singlestep_breakpoint = 0; Ok to check in? 2008-12-01 Doug Evans * infrun.c (handle_inferior_event): Remove redundant resetting of stepping_past_singlestep_breakpoint. Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.342 diff -u -p -r1.342 infrun.c --- infrun.c 22 Nov 2008 04:41:45 -0000 1.342 +++ infrun.c 2 Dec 2008 04:13:24 -0000 @@ -2511,8 +2525,6 @@ targets should add new threads to the th } } - stepping_past_singlestep_breakpoint = 0; - if (!ptid_equal (deferred_step_ptid, null_ptid)) { /* In non-stop mode, there's never a deferred_step_ptid set. */ --- Alternatively, one might prefer this patch, which still preserves the indication that stepping_past_singlestep_breakpoint is 0 at this point but in a clearer form (no redundancy). 2008-12-01 Doug Evans * infrun.c (handle_inferior_event): Replace redundant resetting of stepping_past_singlestep_breakpoint with an assert. Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.342 diff -u -p -r1.342 infrun.c --- infrun.c 22 Nov 2008 04:41:45 -0000 1.342 +++ infrun.c 2 Dec 2008 04:20:08 -0000 @@ -2511,7 +2525,7 @@ targets should add new threads to the th } } - stepping_past_singlestep_breakpoint = 0; + gdb_assert (stepping_past_singlestep_breakpoint == 0); if (!ptid_equal (deferred_step_ptid, null_ptid)) {