diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-10-31 17:38:16 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-10-31 17:38:16 +0000 |
commit | 3352ef37c28505dc3b970e81705977955830eb83 (patch) | |
tree | 324c0600169169c5dbe6e7057b73f38a8720e50a /gdb/mips-tdep.c | |
parent | 2440b685a76ca2758eb810a305e6a903805fe199 (diff) | |
download | gdb-3352ef37c28505dc3b970e81705977955830eb83.zip gdb-3352ef37c28505dc3b970e81705977955830eb83.tar.gz gdb-3352ef37c28505dc3b970e81705977955830eb83.tar.bz2 |
2004-10-31 Orjan Friberg <organ.friberg@axis.com>
Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (single_step_through_delay): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* config/mips/tm-mips.h (STEP_SKIPS_DELAY_P, STEP_SKIPS_DELAY)
(mips_step_skips_delay): Delete.
* mips-tdep.c (mips_single_step_through_delay): Replace
mips_step_skips_delay.
(mips_gdbarch_init): Set single_step_through_delay.
(mips_dump_tdep): Do not print STEP_SKIPS_DELAY.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 047abe5..686b8b1 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4142,16 +4142,19 @@ is_delayed (unsigned long insn) } int -mips_step_skips_delay (CORE_ADDR pc) +mips_single_step_through_delay (struct gdbarch *gdbarch, + struct frame_info *frame) { + CORE_ADDR pc = get_frame_pc (frame); char buf[MIPS_INSN32_SIZE]; /* There is no branch delay slot on MIPS16. */ if (mips_pc_is_mips16 (pc)) return 0; - if (target_read_memory (pc, buf, sizeof buf) != 0) - /* If error reading memory, guess that it is not a delayed branch. */ + if (!safe_frame_unwind_memory (frame, pc, buf, sizeof buf)) + /* If error reading memory, guess that it is not a delayed + branch. */ return 0; return is_delayed (extract_unsigned_integer (buf, sizeof buf)); } @@ -5097,6 +5100,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_solib_return_trampoline); } + set_gdbarch_single_step_through_delay (gdbarch, mips_single_step_through_delay); + /* Hook in OS ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); @@ -5305,9 +5310,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) "mips_dump_tdep: STEP_SKIPS_DELAY # %s\n", XSTRING (STEP_SKIPS_DELAY (PC))); fprintf_unfiltered (file, - "mips_dump_tdep: STEP_SKIPS_DELAY_P = %d\n", - STEP_SKIPS_DELAY_P); - fprintf_unfiltered (file, "mips_dump_tdep: STOPPED_BY_WATCHPOINT # %s\n", XSTRING (STOPPED_BY_WATCHPOINT (WS))); fprintf_unfiltered (file, |