X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Farm-tdep.c;h=a5da56c3f5d5b6cf03abd93d5bfa745be6bdc774;hb=8181d85fdcb9f4d31030a70bd0a1d3f4e1f5b7e3;hp=6b574653f63a24830c6842f5ff8d6054263df7e0;hpb=bb8f5920403b60671c504eda876c8283da2f2165;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 6b574653f6..a5da56c3f5 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1849,16 +1849,18 @@ arm_get_next_pc (CORE_ADDR pc) static void arm_software_single_step (enum target_signal sig, int insert_bpt) { - static int next_pc; /* State between setting and unsetting. */ - static char break_mem[BREAKPOINT_MAX]; /* Temporary storage for mem@bpt */ + /* NOTE: This may insert the wrong breakpoint instruction when + single-stepping over a mode-changing instruction, if the + CPSR heuristics are used. */ if (insert_bpt) { - next_pc = arm_get_next_pc (read_register (ARM_PC_REGNUM)); - target_insert_breakpoint (next_pc, break_mem); + CORE_ADDR next_pc = arm_get_next_pc (read_register (ARM_PC_REGNUM)); + + insert_single_step_breakpoint (next_pc); } else - target_remove_breakpoint (next_pc, break_mem); + remove_single_step_breakpoints (); } #include "bfd-in2.h"