Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [patch] Remove write-only local variable sw_single_step_trap_p
Date: Tue, 21 Jun 2011 05:39:00 -0000	[thread overview]
Message-ID: <4E002E7F.80903@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

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 (齐尧)

[-- Attachment #2: remove_unused_sw_single_step_trap_p.patch --]
[-- Type: text/x-patch, Size: 754 bytes --]

2011-06-21  Yao Qi  <yao@codesourcery.com>

	* 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;
 	}
     }

             reply	other threads:[~2011-06-21  5:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21  5:39 Yao Qi [this message]
2011-06-21  9:18 ` Pedro Alves
2011-06-22 10:12   ` [committed] " Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E002E7F.80903@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox