]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gnu-nat.c
sim: bfin: initial bf60x support
[thirdparty/binutils-gdb.git] / gdb / gnu-nat.c
index abbf4523de639545643a1a7a86383e79d55b6cd6..4608f24780699ac13b999853a68ee83b179a589b 100644 (file)
@@ -1,5 +1,5 @@
 /* Interface GDB to the GNU Hurd.
-   Copyright (C) 1992-2022 Free Software Foundation, Inc.
+   Copyright (C) 1992-2023 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -52,7 +52,6 @@ extern "C"
 #include "defs.h"
 
 #include <ctype.h>
-#include <limits.h>
 #include <setjmp.h>
 #include <signal.h>
 #include <sys/ptrace.h>
@@ -1429,7 +1428,7 @@ gnu_nat_target::inf_continue (struct inf *inf)
 /* The inferior used for all gdb target ops.  */
 struct inf *gnu_current_inf = 0;
 
-/* The inferior being waited for by gnu_wait.  Since GDB is decidely not
+/* The inferior being waited for by gnu_wait.  Since GDB is decidedly not
    multi-threaded, we don't bother to lock this.  */
 static struct inf *waiting_inf;
 
@@ -1562,7 +1561,7 @@ rewait:
       else if (kind == TARGET_WAITKIND_STOPPED
               && w->status.sig () == GDB_SIGNAL_TRAP)
        /* Ah hah!  A SIGTRAP from the inferior while starting up probably
-          means we've succesfully completed an exec!  */
+          means we've successfully completed an exec!  */
        {
          inf_debug (inf, "one pending exec completed");
        }
@@ -2187,8 +2186,7 @@ gnu_nat_target::attach (const char *args, int from_tty)
 
   inf_update_procs (inf);
 
-  thread_info *thr
-    = find_thread_ptid (this, ptid_t (pid, inf_pick_first_thread ()));
+  thread_info *thr = this->find_thread (ptid_t (pid, inf_pick_first_thread ()));
   switch_to_thread (thr);
 
   /* We have to initialize the terminal settings now, since the code
@@ -2469,14 +2467,14 @@ gnu_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
   if (writebuf != NULL)
     {
       inf_debug (gnu_current_inf, "writing %s[%s] <-- %s",
-                paddress (target_gdbarch (), memaddr), pulongest (len),
+                paddress (current_inferior ()->arch (), memaddr), pulongest (len),
                 host_address_to_string (writebuf));
       res = gnu_write_inferior (task, memaddr, writebuf, len);
     }
   else
     {
       inf_debug (gnu_current_inf, "reading %s[%s] --> %s",
-                paddress (target_gdbarch (), memaddr), pulongest (len),
+                paddress (current_inferior ()->arch (), memaddr), pulongest (len),
                 host_address_to_string (readbuf));
       res = gnu_read_inferior (task, memaddr, readbuf, len);
     }
@@ -2531,7 +2529,7 @@ gnu_xfer_auxv (gdb_byte *readbuf, const gdb_byte *writebuf,
   auxv[1].a_un.a_val = 0;
 
   inf_debug (gnu_current_inf, "reading auxv %s[%s] --> %s",
-            paddress (target_gdbarch (), memaddr), pulongest (len),
+            paddress (current_inferior ()->arch (), memaddr), pulongest (len),
             host_address_to_string (readbuf));
 
   if (memaddr + len > sizeof (auxv))