#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);