gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / gnu-nat.c
index b34935e8e1e2b96bbfd8a75bfde58de544585220..59d2f2383df5a686daed1f29683b795d7f4a1348 100644 (file)
@@ -1,6 +1,5 @@
 /* Interface GDB to the GNU Hurd.
-   Copyright (C) 1992, 1995-2001, 2006-2012 Free Software Foundation,
-   Inc.
+   Copyright (C) 1992-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,8 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 
@@ -2491,7 +2489,7 @@ gnu_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
     {
       inf_debug (gnu_current_inf, "%s %s[%d] %s %s",
                 write ? "writing" : "reading",
-                paddress (target_gdbarch, memaddr), len,
+                paddress (target_gdbarch (), memaddr), len,
                 write ? "<--" : "-->", host_address_to_string (myaddr));
       if (write)
        return gnu_write_inferior (task, memaddr, myaddr, len);
@@ -2587,10 +2585,10 @@ proc_string (struct proc *proc)
   static char tid_str[80];
 
   if (proc_is_task (proc))
-    sprintf (tid_str, "process %d", proc->inf->pid);
+    xsnprintf (tid_str, sizeof (tid_str), "process %d", proc->inf->pid);
   else
-    sprintf (tid_str, "Thread %d.%d",
-            proc->inf->pid, proc->tid);
+    xsnprintf (tid_str, sizeof (tid_str), "Thread %d.%d",
+              proc->inf->pid, proc->tid);
   return tid_str;
 }
 
@@ -2607,7 +2605,7 @@ gnu_pid_to_str (struct target_ops *ops, ptid_t ptid)
     {
       static char tid_str[80];
 
-      sprintf (tid_str, "bogus thread id %d", tid);
+      xsnprintf (tid_str, sizeof (tid_str), "bogus thread id %d", tid);
       return tid_str;
     }
 }
This page took 0.063682 seconds and 4 git commands to generate.