aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2004-11-23 21:05:23 +0000
committerRandolph Chung <tausq@debian.org>2004-11-23 21:05:23 +0000
commit3ca649544956e996656d40602064d9169949252b (patch)
treed4b05ca6ae749846443899a63d5113ee912da22b /gdb/gdbarch.h
parent0107feeddf942c0686ac9256fca6467baca40bf0 (diff)
downloadgdb-3ca649544956e996656d40602064d9169949252b.zip
gdb-3ca649544956e996656d40602064d9169949252b.tar.gz
gdb-3ca649544956e996656d40602064d9169949252b.tar.bz2
2004-11-23 Randolph Chung <tausq@debian.org>
* arch-utils.c (generic_instruction_nullified): New. * arch-utils.h (generic_instruction_nullified): New. * gdbarch.sh (instruction_nullified): New method. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * infrun.c (INSTRUCTION_NULLIFIED): Delete. (handle_inferior_event): Replace INSTRUCTION_NULLIFIED with calls to new gdbarch method. * config/pa/tm-hppa.h (INSTRUCTION_NULLIFIED): Delete definition. * hppa-tdep.c (hppa_instruction_nullified): Remove prototype and make static. Rewrite to work directly off the passed regcache. (hppa_gdbarch_init): Set instruction_nullified method.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 4ab8ea5..b59f6e7 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1227,6 +1227,16 @@ typedef int (gdbarch_single_step_through_delay_ftype) (struct gdbarch *gdbarch,
extern int gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch, gdbarch_single_step_through_delay_ftype *single_step_through_delay);
+/* On some systems, the PC may be left pointing at an instruction that won't
+ actually be executed. This is usually indicated by a bit in the PSW. If
+ we find ourselves in such a state, then we step the target beyond the
+ nullified instruction before returning control to gdb.
+ Return non-zero if the processor is about to execute a nullified instruction. */
+
+typedef int (gdbarch_instruction_nullified_ftype) (struct gdbarch *gdbarch, struct regcache *regcache);
+extern int gdbarch_instruction_nullified (struct gdbarch *gdbarch, struct regcache *regcache);
+extern void set_gdbarch_instruction_nullified (struct gdbarch *gdbarch, gdbarch_instruction_nullified_ftype *instruction_nullified);
+
/* FIXME: cagney/2003-08-28: Need to find a better way of selecting the
disassembler. Perhaps objdump can handle it? */