X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Famd64-darwin-tdep.c;h=5cf3ff266a4686a5ae5899a78facb7280ac6521c;hb=8677059126a84cb9f71371beb8688138a41014fc;hp=8b4a7bb166a5524c4369661e7b22feef2e338042;hpb=7b6bb8daaceb9ecf3f42dea57ae82733d6a3b2f6;p=binutils-gdb.git diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c index 8b4a7bb166a..5cf3ff266a4 100644 --- a/gdb/amd64-darwin-tdep.c +++ b/gdb/amd64-darwin-tdep.c @@ -1,6 +1,5 @@ /* Darwin support for GDB, the GNU debugger. - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2021 Free Software Foundation, Inc. Contributed by Apple Computer, Inc. @@ -24,24 +23,20 @@ #include "inferior.h" #include "gdbcore.h" #include "target.h" -#include "floatformat.h" #include "symtab.h" #include "regcache.h" -#include "libbfd.h" #include "objfiles.h" #include "i387-tdep.h" +#include "gdbsupport/x86-xstate.h" #include "amd64-tdep.h" #include "osabi.h" #include "ui-out.h" -#include "symtab.h" -#include "frame.h" -#include "gdb_assert.h" #include "amd64-darwin-tdep.h" #include "i386-darwin-tdep.h" #include "solib.h" #include "solib-darwin.h" -#include "dwarf2-frame.h" +#include "dwarf2/frame.h" /* Offsets into the struct x86_thread_state64 where we'll find the saved regs. From and amd64-tdep.h. */ @@ -55,7 +50,7 @@ int amd64_darwin_thread_state_reg_offset[] = 4 * 8, /* %rdi */ 6 * 8, /* %rbp */ 7 * 8, /* %rsp */ - 8 * 8, /* %r8 ... */ + 8 * 8, /* %r8 ... */ 9 * 8, 10 * 8, 11 * 8, @@ -85,7 +80,6 @@ amd64_darwin_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 rbx; - CORE_ADDR si; gdb_byte buf[8]; /* A pointer to the ucontext is passed as the fourth argument @@ -103,9 +97,10 @@ amd64_darwin_sigcontext_addr (struct frame_info *this_frame) static void x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); - amd64_init_abi (info, gdbarch); + amd64_init_abi (info, gdbarch, + amd64_target_description (X86_XSTATE_SSE_MASK, true)); tdep->struct_return = reg_struct_return; @@ -116,14 +111,15 @@ x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->sc_reg_offset = amd64_darwin_thread_state_reg_offset; tdep->sc_num_regs = amd64_darwin_thread_state_num_regs; - tdep->jb_pc_offset = 148; + tdep->jb_pc_offset = 56; set_solib_ops (gdbarch, &darwin_so_ops); } +void _initialize_amd64_darwin_tdep (); void -_initialize_amd64_darwin_tdep (void) +_initialize_amd64_darwin_tdep () { gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, - GDB_OSABI_DARWIN, x86_darwin_init_abi_64); + GDB_OSABI_DARWIN, x86_darwin_init_abi_64); }