From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22419 invoked by alias); 21 Jun 2011 05:39:35 -0000 Received: (qmail 22338 invoked by uid 22791); 21 Jun 2011 05:39:33 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD 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; Tue, 21 Jun 2011 05:39:19 +0000 Received: (qmail 25635 invoked from network); 21 Jun 2011 05:39:16 -0000 Received: from unknown (HELO ?192.168.0.102?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Jun 2011 05:39:16 -0000 Message-ID: <4E002E7F.80903@codesourcery.com> Date: Tue, 21 Jun 2011 05:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch] Remove write-only local variable sw_single_step_trap_p Content-Type: multipart/mixed; boundary="------------090600040006050206050504" 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: 2011-06/txt/msg00276.txt.bz2 This is a multi-part message in MIME format. --------------090600040006050206050504 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-length: 194 Local variable sw_single_step_trap_p is not read in handle_inferior_event. We can safely remove it. It is somewhat obvious, and I'll check it in in 24 hours if no objection. -- Yao (齐尧) --------------090600040006050206050504 Content-Type: text/x-patch; name="remove_unused_sw_single_step_trap_p.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="remove_unused_sw_single_step_trap_p.patch" Content-length: 754 2011-06-21 Yao Qi * infrun.c (handle_inferior_event): Remove write-only local variable `sw_single_step_trap_p'. diff --git a/gdb/infrun.c b/gdb/infrun.c index 1d8932a..fbf26fc 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3083,7 +3083,6 @@ handle_inferior_event (struct execution_control_state *ecs) { struct frame_info *frame; struct gdbarch *gdbarch; - int sw_single_step_trap_p = 0; int stopped_by_watchpoint; int stepped_after_stopped_by_watchpoint = 0; struct symtab_and_line stop_pc_sal; @@ -3833,7 +3832,6 @@ handle_inferior_event (struct execution_control_state *ecs) } else if (singlestep_breakpoints_inserted_p) { - sw_single_step_trap_p = 1; ecs->random_signal = 0; } } --------------090600040006050206050504--