X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Famd64-linux-tdep.c;h=92f52655d57c9cb7bf443cde0d224656057b010a;hb=e17a4113357102b55cfa5b80557d590a46a43300;hp=1d99cd4f9d38bc162b2d1bbf921552a17bc9a00a;hpb=0fb0cc7590113e9b459dfcc48dc71c9d419d9580;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 1d99cd4f9d..92f52655d5 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -20,6 +20,7 @@ along with this program. If not, see . */ #include "defs.h" +#include "arch-utils.h" #include "frame.h" #include "gdbcore.h" #include "regcache.h" @@ -28,6 +29,7 @@ #include "gdbtypes.h" #include "reggroups.h" #include "amd64-linux-tdep.h" +#include "linux-tdep.h" #include "gdb_string.h" @@ -151,11 +153,13 @@ amd64_linux_sigtramp_p (struct frame_info *this_frame) static CORE_ADDR amd64_linux_sigcontext_addr (struct frame_info *this_frame) { + struct gdbarch *gdbarch = get_frame_arch (this_frame); + enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR sp; gdb_byte buf[8]; get_frame_register (this_frame, AMD64_RSP_REGNUM, buf); - sp = extract_unsigned_integer (buf, 8); + sp = extract_unsigned_integer (buf, 8, byte_order); /* The sigcontext structure is part of the user context. A pointer to the user context is passed as the third argument to the signal @@ -216,7 +220,7 @@ static struct type * amd64_linux_register_type (struct gdbarch *gdbarch, int reg) { if (reg == AMD64_LINUX_ORIG_RAX_REGNUM) - return builtin_type_int64; + return builtin_type (gdbarch)->builtin_int64; return amd64_register_type (gdbarch, reg); } @@ -286,6 +290,17 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* Enable TLS support. */ set_gdbarch_fetch_tls_load_module_address (gdbarch, svr4_fetch_objfile_link_map); + + /* Displaced stepping. */ + set_gdbarch_displaced_step_copy_insn (gdbarch, + amd64_displaced_step_copy_insn); + set_gdbarch_displaced_step_fixup (gdbarch, amd64_displaced_step_fixup); + set_gdbarch_displaced_step_free_closure (gdbarch, + simple_displaced_step_free_closure); + set_gdbarch_displaced_step_location (gdbarch, + displaced_step_at_entry_point); + + set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type); }