/* Target-dependent code for FreeBSD/amd64.
- Copyright (C) 2003-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003-2021 Free Software Foundation, Inc.
This file is part of GDB.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-
-/* Local non-gdb includes. */
-#include "amd64-tdep.h"
#include "arch-utils.h"
-#include "common/x86-xstate.h"
-#include "fbsd-tdep.h"
#include "frame.h"
#include "gdbcore.h"
-#include "i386-fbsd-tdep.h"
-#include "osabi.h"
#include "regcache.h"
+#include "osabi.h"
#include "regset.h"
+#include "i386-fbsd-tdep.h"
+#include "gdbsupport/x86-xstate.h"
+
+#include "amd64-tdep.h"
+#include "fbsd-tdep.h"
#include "solib-svr4.h"
+#include "inferior.h"
/* Support for signal handlers. */
CORE_ADDR pc = get_frame_pc (this_frame);
gdb_byte buf[sizeof amd64fbsd_sigtramp_code];
- if (!safe_frame_unwind_memory (this_frame, pc, buf, sizeof buf))
+ if (!safe_frame_unwind_memory (this_frame, pc, buf))
return 0;
if (memcmp (buf, amd64fbsd_sigtramp_code, sizeof amd64fbsd_sigtramp_code)
!= 0)
{
struct regcache *regcache;
- regcache = get_thread_arch_regcache (ptid, gdbarch);
+ regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
+ ptid, gdbarch);
target_fetch_registers (regcache, AMD64_FSBASE_REGNUM);
amd64fbsd_get_thread_local_address);
}
+void _initialize_amd64fbsd_tdep ();
void
-_initialize_amd64fbsd_tdep (void)
+_initialize_amd64fbsd_tdep ()
{
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
GDB_OSABI_FREEBSD, amd64fbsd_init_abi);