diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2013-03-22 15:56:56 +0100 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2014-01-16 12:45:11 +0100 |
commit | c2170eeffa616c51ca4c7ab7142523c04b762603 (patch) | |
tree | 8275515276a5b0591073db7cf182e45545f12471 /gdb/arch-utils.h | |
parent | 864089d2f64c6624aac3f52ece2c31dff6a8f59f (diff) | |
download | gdb-c2170eeffa616c51ca4c7ab7142523c04b762603.zip gdb-c2170eeffa616c51ca4c7ab7142523c04b762603.tar.gz gdb-c2170eeffa616c51ca4c7ab7142523c04b762603.tar.bz2 |
gdbarch: add instruction predicate methods
Add new methods to gdbarch for analyzing the instruction at a given address.
Implement those methods for i386 and amd64 architectures.
This is needed by "record btrace" to detect function calls in the
execution trace.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* amd64-tdep.c (amd64_classify_insn_at, amd64_insn_is_call)
(amd64_insn_is_ret, amd64_insn_is_jump, amd64_jmp_p): New.
(amd64_init_abi): Add insn_is_call, insn_is_ret, and insn_is_jump
to gdbarch.
* i386-tdep.c (i386_insn_is_call, i386_insn_is_ret)
(i386_insn_is_jump, i386_jmp_p): New.
(i386_gdbarch_init): Add insn_is_call, insn_is_ret, and
insn_is_jump to gdbarch.
* gdbarch.sh (insn_is_call, insn_is_ret, insn_is_jump): New.
* gdbarch.h: Regenerated.
* gdbarch.c: Regenerated.
* arch-utils.h (default_insn_is_call, default_insn_is_ret)
(default_insn_is_jump): New.
* arch-utils.c (default_insn_is_call, default_insn_is_ret)
(default_insn_is_jump): New.
Diffstat (limited to 'gdb/arch-utils.h')
-rw-r--r-- | gdb/arch-utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 08ad4f9..46d1573 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -170,4 +170,8 @@ extern const char *default_auto_wide_charset (void); extern int default_return_in_first_hidden_param_p (struct gdbarch *, struct type *); + +extern int default_insn_is_call (struct gdbarch *, CORE_ADDR); +extern int default_insn_is_ret (struct gdbarch *, CORE_ADDR); +extern int default_insn_is_jump (struct gdbarch *, CORE_ADDR); #endif |