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/rs6000-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/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index eb5c8b4..9622aa2 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -723,8 +723,7 @@ rs6000_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size) /* AIX does not support PT_STEP. Simulate it. */ int -rs6000_software_single_step (enum target_signal signal, - int insert_breakpoints_p) +rs6000_software_single_step (struct regcache *regcache) { CORE_ADDR dummy; int breakp_sz; @@ -734,30 +733,25 @@ rs6000_software_single_step (enum target_signal signal, CORE_ADDR breaks[2]; int opcode; - if (insert_breakpoints_p) - { - loc = read_pc (); + loc = read_pc (); - insn = read_memory_integer (loc, 4); + insn = read_memory_integer (loc, 4); - breaks[0] = loc + breakp_sz; - opcode = insn >> 26; - breaks[1] = branch_dest (opcode, insn, loc, breaks[0]); + breaks[0] = loc + breakp_sz; + opcode = insn >> 26; + breaks[1] = branch_dest (opcode, insn, loc, breaks[0]); - /* Don't put two breakpoints on the same address. */ - if (breaks[1] == breaks[0]) - breaks[1] = -1; + /* Don't put two breakpoints on the same address. */ + if (breaks[1] == breaks[0]) + breaks[1] = -1; - for (ii = 0; ii < 2; ++ii) - { - /* ignore invalid breakpoint. */ - if (breaks[ii] == -1) - continue; - insert_single_step_breakpoint (breaks[ii]); - } + for (ii = 0; ii < 2; ++ii) + { + /* ignore invalid breakpoint. */ + if (breaks[ii] == -1) + continue; + insert_single_step_breakpoint (breaks[ii]); } - else - remove_single_step_breakpoints (); errno = 0; /* FIXME, don't ignore errors! */ /* What errors? {read,write}_memory call error(). */ |