diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-14 18:10:54 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-14 18:10:54 +0000 |
commit | e0cd558aaae1d2c457f3963c58e78ec419f0712a (patch) | |
tree | e26699b93e249067be360336f3711f2fc6e7ead7 /gdb/sparc-tdep.c | |
parent | 06a862851c31bb286d5f8177b9a5db6a65282fb8 (diff) | |
download | gdb-e0cd558aaae1d2c457f3963c58e78ec419f0712a.zip gdb-e0cd558aaae1d2c457f3963c58e78ec419f0712a.tar.gz gdb-e0cd558aaae1d2c457f3963c58e78ec419f0712a.tar.bz2 |
* gdbarch.sh (software_single_step): Remove "insert_breakpoints_p" and
"sig" arguments, add "regcache" argument.
* gdbarch.c, gdbarch.h: Regenerate.
* infrun.c (resume): Update SOFTWARE_SINGLE_STEP call arguments.
(handle_inferior_event): Call remove_single_step_breakpoints directly
instead of calling SOFTWARE_SINGLE_STEP to remove breakpoints.
* alpha-tdep.c (alpha_software_single_step): Update argument list.
Remove handling of !insert_breakpoints_p case.
* arm-tdep.c (arm_software_single_step): Likewise.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* spu-tdep.c (spu_software_single_step): Likewise.
* alpha-tdep.h (alpha_software_single_step): Update prototype.
* mips-tdep.h (mips_software_single_step): Likewise.
* rs6000-tdep.h (rs6000_software_single_step): Likewise.
* sparc-tdep.h (sparc_software_single_step): Likewise.
Diffstat (limited to 'gdb/sparc-tdep.c')
-rw-r--r-- | gdb/sparc-tdep.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 3d2d97b..0e2a496 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1330,35 +1330,30 @@ sparc_step_trap (unsigned long insn) } int -sparc_software_single_step (enum target_signal sig, int insert_breakpoints_p) +sparc_software_single_step (struct regcache *regcache) { struct gdbarch *arch = current_gdbarch; struct gdbarch_tdep *tdep = gdbarch_tdep (arch); CORE_ADDR npc, nnpc; - if (insert_breakpoints_p) - { - CORE_ADDR pc, orig_npc; + CORE_ADDR pc, orig_npc; - pc = sparc_address_from_register (tdep->pc_regnum); - orig_npc = npc = sparc_address_from_register (tdep->npc_regnum); + pc = sparc_address_from_register (tdep->pc_regnum); + orig_npc = npc = sparc_address_from_register (tdep->npc_regnum); - /* Analyze the instruction at PC. */ - nnpc = sparc_analyze_control_transfer (arch, pc, &npc); - if (npc != 0) - insert_single_step_breakpoint (npc); + /* Analyze the instruction at PC. */ + nnpc = sparc_analyze_control_transfer (arch, pc, &npc); + if (npc != 0) + insert_single_step_breakpoint (npc); - if (nnpc != 0) - insert_single_step_breakpoint (nnpc); + if (nnpc != 0) + insert_single_step_breakpoint (nnpc); - /* Assert that we have set at least one breakpoint, and that - they're not set at the same spot - unless we're going - from here straight to NULL, i.e. a call or jump to 0. */ - gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0); - gdb_assert (nnpc != npc || orig_npc == 0); - } - else - remove_single_step_breakpoints (); + /* Assert that we have set at least one breakpoint, and that + they're not set at the same spot - unless we're going + from here straight to NULL, i.e. a call or jump to 0. */ + gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0); + gdb_assert (nnpc != npc || orig_npc == 0); return 1; } |