Introduce compiled_regex, eliminate make_regfree_cleanup
[deliverable/binutils-gdb.git] / gdb / i386-gnu-nat.c
index 77081b8d6f2a7c7c17a9a0c65409b509ab615e25..3bce88a20608c1c3575a03491112c389d8f71e99 100644 (file)
@@ -1,6 +1,6 @@
 /* Low level interface to i386 running the GNU Hurd.
 
-   Copyright (C) 1992-2016 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -91,15 +91,15 @@ gnu_fetch_registers (struct target_ops *ops,
                     struct regcache *regcache, int regno)
 {
   struct proc *thread;
+  ptid_t ptid = regcache_get_ptid (regcache);
 
   /* Make sure we know about new threads.  */
   inf_update_procs (gnu_current_inf);
 
-  thread = inf_tid_to_thread (gnu_current_inf,
-                             ptid_get_lwp (inferior_ptid));
+  thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
   if (!thread)
     error (_("Can't fetch registers from thread %s: No such thread"),
-          target_pid_to_str (inferior_ptid));
+          target_pid_to_str (ptid));
 
   if (regno < I386_NUM_GREGS || regno == -1)
     {
@@ -184,15 +184,15 @@ gnu_store_registers (struct target_ops *ops,
 {
   struct proc *thread;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  ptid_t ptid = regcache_get_ptid (regcache);
 
   /* Make sure we know about new threads.  */
   inf_update_procs (gnu_current_inf);
 
-  thread = inf_tid_to_thread (gnu_current_inf,
-                             ptid_get_lwp (inferior_ptid));
+  thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
   if (!thread)
     error (_("Couldn't store registers into thread %s: No such thread"),
-          target_pid_to_str (inferior_ptid));
+          target_pid_to_str (ptid));
 
   if (regno < I386_NUM_GREGS || regno == -1)
     {
This page took 0.054464 seconds and 4 git commands to generate.