This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch v4 01/24] 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 all really amd64/i386-centric.  On a more abstract level, what
is the difference between "call", "ret" and "jump"?

> 2013-07-03  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.
> 
> 
> ---
>  gdb/amd64-tdep.c |   67 ++++++++++++++++++++++++++++++++++
>  gdb/arch-utils.c |   15 ++++++++
>  gdb/arch-utils.h |    4 ++
>  gdb/gdbarch.c    |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  gdb/gdbarch.h    |   24 ++++++++++++
>  gdb/gdbarch.sh   |    9 +++++
>  gdb/i386-tdep.c  |   59 ++++++++++++++++++++++++++++++
>  7 files changed, 283 insertions(+), 0 deletions(-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]