Multi-target support
[deliverable/binutils-gdb.git] / gdb / riscv-fbsd-tdep.c
index 3125a2285e1e2aa74b8833d25a8f9bfc851a5e5c..157907373c4e16d3a9a433000588451238851c3c 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -25,6 +25,8 @@
 #include "target.h"
 #include "trad-frame.h"
 #include "tramp-frame.h"
+#include "gdbarch.h"
+#include "inferior.h"
 
 /* Register maps.  */
 
@@ -182,7 +184,8 @@ riscv_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
 {
   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);
 
This page took 0.025432 seconds and 4 git commands to generate.