/* Target-dependent code for FreeBSD on RISC-V processors.
- Copyright (C) 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2018-2020 Free Software Foundation, Inc.
This file is part of GDB.
#include "trad-frame.h"
#include "tramp-frame.h"
#include "gdbarch.h"
+#include "inferior.h"
/* Register maps. */
regcache_supply_regset, regcache_collect_regset
};
-/* Implement the "regset_from_core_section" gdbarch method. */
+/* Implement the "iterate_over_regset_sections" gdbarch method. */
static void
riscv_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
{
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, RISCV_TP_REGNUM);
riscv_fbsd_get_thread_local_address);
}
+void _initialize_riscv_fbsd_tdep ();
void
-_initialize_riscv_fbsd_tdep (void)
+_initialize_riscv_fbsd_tdep ()
{
gdbarch_register_osabi (bfd_arch_riscv, 0, GDB_OSABI_FREEBSD,
riscv_fbsd_init_abi);