From: Yao Qi Date: Wed, 8 Apr 2015 15:04:07 +0000 (+0100) Subject: [spu] Don't call set_gdbarch_cannot_step_breakpoint in spu_gdbarch_init X-Git-Tag: gdb-7.10-branchpoint~797 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85558555ec343f6e8ec32da409c838954e68132f;p=thirdparty%2Fbinutils-gdb.git [spu] Don't call set_gdbarch_cannot_step_breakpoint in spu_gdbarch_init Nowadays, in infrun.c:resume, the setting to 'step' variable is like: if (use_displaced_stepping (gdbarch) && tp->control.trap_expected && sig == GDB_SIGNAL_0 && !current_inferior ()->waiting_for_vfork_done) { } /* Do we need to do it the hard way, w/temp breakpoints? */ else if (step) step = maybe_software_singlestep (gdbarch, pc); <-- [1] ... if (execution_direction != EXEC_REVERSE && step && breakpoint_inserted_here_p (aspace, pc)) { ... if (gdbarch_cannot_step_breakpoint (gdbarch)) <-- [2] step = 0; } spu doesn't have displaced stepping and uses software single step, so 'step' is set to zero in [1], and [2] becomes unreachable as a result. So don't have to call set_gdbarch_cannot_step_breakpoint in spu_gdbarch_init. gdb: 2015-04-08 Yao Qi * spu-tdep.c (spu_gdbarch_init): Don't call set_gdbarch_cannot_step_breakpoint. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 432cc3e1755..5b4604c1a7f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-04-08 Yao Qi + + * spu-tdep.c (spu_gdbarch_init): Don't call + set_gdbarch_cannot_step_breakpoint. + 2015-04-07 Sergio Durigan Junior * linux-tdep.c (decode_vmflags): Initialize 'saveptr'. diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 6ccb6791409..7e05834ed59 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -2794,7 +2794,6 @@ spu_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_decr_pc_after_break (gdbarch, 4); set_gdbarch_breakpoint_from_pc (gdbarch, spu_breakpoint_from_pc); set_gdbarch_memory_remove_breakpoint (gdbarch, spu_memory_remove_breakpoint); - set_gdbarch_cannot_step_breakpoint (gdbarch, 1); set_gdbarch_software_single_step (gdbarch, spu_software_single_step); set_gdbarch_get_longjmp_target (gdbarch, spu_get_longjmp_target);