* [patch] Remove write-only local variable sw_single_step_trap_p
@ 2011-06-21 5:39 Yao Qi
2011-06-21 9:18 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2011-06-21 5:39 UTC (permalink / raw)
To: gdb-patches
[-- 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;
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Remove write-only local variable sw_single_step_trap_p
2011-06-21 5:39 [patch] Remove write-only local variable sw_single_step_trap_p Yao Qi
@ 2011-06-21 9:18 ` Pedro Alves
2011-06-22 10:12 ` [committed] " Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2011-06-21 9:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Yao Qi
On Tuesday 21 June 2011 06:39:11, Yao Qi wrote:
> 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.
This is okay. AFAICS, that variable became unused/unnecessary when
gdb was made to adjust the PC early with adjust_pc_after_break.
(I looked at 5.3's sources [circa 2002], to check how the
variable was used back then)
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* [committed] [patch] Remove write-only local variable sw_single_step_trap_p
2011-06-21 9:18 ` Pedro Alves
@ 2011-06-22 10:12 ` Yao Qi
0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2011-06-22 10:12 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On 06/21/2011 05:17 PM, Pedro Alves wrote:
> This is okay. AFAICS, that variable became unused/unnecessary when
> gdb was made to adjust the PC early with adjust_pc_after_break.
> (I looked at 5.3's sources [circa 2002], to check how the
> variable was used back then)
Committed. http://sourceware.org/ml/gdb-cvs/2011-06/msg00116.html
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-22 10:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 5:39 [patch] Remove write-only local variable sw_single_step_trap_p Yao Qi
2011-06-21 9:18 ` Pedro Alves
2011-06-22 10:12 ` [committed] " Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox