/* 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 "target.h"
#include "trad-frame.h"
#include "tramp-frame.h"
+#include "gdbarch.h"
+#include "inferior.h"
/* Register maps. */
{
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);