From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19251 invoked by alias); 17 May 2013 16:21:32 -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 19241 invoked by uid 89); 17 May 2013 16:21:32 -0000 X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 17 May 2013 16:21:31 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4HGLUnj006541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 May 2013 12:21:30 -0400 Received: from barimba (ovpn-113-158.phx2.redhat.com [10.3.113.158]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4HGLTpj008679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 17 May 2013 12:21:30 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Subject: Re: [PATCH 38/40] some fixes to infrun.c References: <72b491c4ccd7996cf471b85b346616f207e69760.1368124285.git.tromey@redhat.com> Date: Fri, 17 May 2013 16:21:00 -0000 In-Reply-To: <72b491c4ccd7996cf471b85b346616f207e69760.1368124285.git.tromey@redhat.com> (Tom Tromey's message of "Thu, 09 May 2013 12:52:58 -0600") Message-ID: <87ip2hr306.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00686.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Tom> This fixes some of the problems in infrun.c that the checker reported. Tom> I filed the remaining problems as bugs. The new checker let me drop a couple of parts from this patch. The new patch is appended. Tom * infrun.c (adjust_pc_after_break): Introduce an outer null cleanup. --- gdb/infrun.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 54e92f2..b768ffd 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3004,10 +3004,10 @@ adjust_pc_after_break (struct execution_control_state *ecs) if (software_breakpoint_inserted_here_p (aspace, breakpoint_pc) || (non_stop && moribund_breakpoint_here_p (aspace, breakpoint_pc))) { - struct cleanup *old_cleanups = NULL; + struct cleanup *old_cleanups = make_cleanup (null_cleanup, NULL); if (RECORD_IS_USED) - old_cleanups = record_full_gdb_operation_disable_set (); + record_full_gdb_operation_disable_set (); /* When using hardware single-step, a SIGTRAP is reported for both a completed single-step and a software breakpoint. Need to @@ -3033,8 +3033,7 @@ adjust_pc_after_break (struct execution_control_state *ecs) || ecs->event_thread->prev_pc == breakpoint_pc) regcache_write_pc (regcache, breakpoint_pc); - if (RECORD_IS_USED) - do_cleanups (old_cleanups); + do_cleanups (old_cleanups); } } -- 1.8.1.4