gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / gnu-nat.c
index 0c45f2026d1a85f9d8eb943318fba55159b78f3d..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,9 @@
    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"
 
 #include <ctype.h>
 #include <errno.h>
@@ -52,7 +52,6 @@
 
 #include <portinfo.h>
 
-#include "defs.h"
 #include "inferior.h"
 #include "symtab.h"
 #include "value.h"
@@ -2490,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);
@@ -2558,6 +2557,7 @@ gnu_find_memory_regions (find_memory_region_ftype func, void *data)
                     last_protection & VM_PROT_READ,
                     last_protection & VM_PROT_WRITE,
                     last_protection & VM_PROT_EXECUTE,
+                    1, /* MODIFIED is unknown, pass it as true.  */
                     data);
          last_region_address = region_address;
          last_region_end = region_address += region_length;
@@ -2571,6 +2571,7 @@ gnu_find_memory_regions (find_memory_region_ftype func, void *data)
             last_protection & VM_PROT_READ,
             last_protection & VM_PROT_WRITE,
             last_protection & VM_PROT_EXECUTE,
+            1, /* MODIFIED is unknown, pass it as true.  */
             data);
 
   return 0;
@@ -2584,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;
 }
 
@@ -2604,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;
     }
 }
@@ -2643,8 +2644,8 @@ gnu_target (void)
 \f
 /* User task commands.  */
 
-struct cmd_list_element *set_task_cmd_list = 0;
-struct cmd_list_element *show_task_cmd_list = 0;
+static struct cmd_list_element *set_task_cmd_list = 0;
+static struct cmd_list_element *show_task_cmd_list = 0;
 /* User thread commands.  */
 
 /* Commands with a prefix of `set/show thread'.  */
This page took 0.024651 seconds and 4 git commands to generate.