aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile/compile-object-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/compile/compile-object-load.c')
-rw-r--r--gdb/compile/compile-object-load.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index fac16d7..9b3c51f 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -28,6 +28,7 @@
#include "gdbcmd.h"
#include "regcache.h"
#include "inferior.h"
+#include "gdbthread.h"
#include "compile.h"
#include "block.h"
#include "arch-utils.h"
@@ -554,8 +555,9 @@ get_regs_type (struct symbol *func_sym, struct objfile *objfile)
static void
store_regs (struct type *regs_type, CORE_ADDR regs_base)
{
+ thread_info *thread = inferior_thread ();
struct gdbarch *gdbarch = target_gdbarch ();
- struct regcache *regcache = get_thread_regcache (inferior_ptid);
+ struct regcache *regcache = get_thread_regcache (thread);
int fieldno;
for (fieldno = 0; fieldno < TYPE_NFIELDS (regs_type); fieldno++)