RISC-V: Add gas support for "fp" register.
[deliverable/binutils-gdb.git] / gdb / corelow.c
index a81639542b91e99af450af1fcd380cd41c8a490e..ed20b531beed7432dbd3782fd61d32d5412241d2 100644 (file)
@@ -260,11 +260,9 @@ core_target::close ()
 {
   if (core_bfd)
     {
-      int pid = ptid_get_pid (inferior_ptid);
       inferior_ptid = null_ptid;    /* Avoid confusion from thread
                                       stuff.  */
-      if (pid != 0)
-       exit_inferior_silent (pid);
+      exit_inferior_silent (current_inferior ());
 
       /* Clear out solib state while the bfd is still open.  See
          comments in clear_solib in solib.c.  */
@@ -454,7 +452,7 @@ core_target_open (const char *arg, int from_tty)
         which was the "main" thread.  The latter case shouldn't
         usually happen, but we're dealing with input here, which can
         always be broken in different ways.  */
-      struct thread_info *thread = first_thread_of_process (-1);
+      thread_info *thread = first_thread_of_inferior (current_inferior ());
 
       if (thread == NULL)
        {
@@ -463,7 +461,7 @@ core_target_open (const char *arg, int from_tty)
          add_thread_silent (inferior_ptid);
        }
       else
-       switch_to_thread (thread->ptid);
+       switch_to_thread (thread);
     }
 
   post_create_inferior (target, from_tty);
@@ -950,9 +948,9 @@ core_target::xfer_partial (enum target_object object, const char *annex,
       return TARGET_XFER_E_IO;
 
     default:
-      return this->beneath->xfer_partial (object, annex, readbuf,
-                                         writebuf, offset, len,
-                                         xfered_len);
+      return this->beneath ()->xfer_partial (object, annex, readbuf,
+                                            writebuf, offset, len,
+                                            xfered_len);
     }
 }
 
@@ -987,7 +985,7 @@ core_target::read_description ()
        return result;
     }
 
-  return this->beneath->read_description ();
+  return this->beneath ()->read_description ();
 }
 
 const char *
This page took 0.027734 seconds and 4 git commands to generate.