gas/testsuite/
[deliverable/binutils-gdb.git] / gdb / target.c
index e2bb96d0ccf6c5ad73dbfb37565e31addedb2918..f3a971351b1fd83c916b9311ef4af7e91e07b749 100644 (file)
@@ -114,9 +114,9 @@ static int deprecated_debug_xfer_memory (CORE_ADDR, char *, int, int,
 
 static void debug_to_files_info (struct target_ops *);
 
-static int debug_to_insert_breakpoint (CORE_ADDR, char *);
+static int debug_to_insert_breakpoint (CORE_ADDR, bfd_byte *);
 
-static int debug_to_remove_breakpoint (CORE_ADDR, char *);
+static int debug_to_remove_breakpoint (CORE_ADDR, bfd_byte *);
 
 static int debug_to_can_use_hw_breakpoint (int, int, int);
 
@@ -1803,15 +1803,17 @@ store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
 int (*target_activity_function) (void);
 int target_activity_fd;
 \f
-/* Convert a normal process ID to a string.  Returns the string in a static
-   buffer.  */
+/* Convert a normal process ID to a string.  Returns the string in a
+   static buffer.  */
 
 char *
 normal_pid_to_str (ptid_t ptid)
 {
-  static char buf[30];
+  static char buf[32];
+  int size;
 
-  sprintf (buf, "process %d", PIDGET (ptid));
+  size = snprintf (buf, sizeof buf, "process %d", ptid_get_pid (ptid));
+  gdb_assert (size < sizeof buf);
   return buf;
 }
 
@@ -2066,7 +2068,7 @@ debug_to_files_info (struct target_ops *target)
 }
 
 static int
-debug_to_insert_breakpoint (CORE_ADDR addr, char *save)
+debug_to_insert_breakpoint (CORE_ADDR addr, bfd_byte *save)
 {
   int retval;
 
@@ -2080,7 +2082,7 @@ debug_to_insert_breakpoint (CORE_ADDR addr, char *save)
 }
 
 static int
-debug_to_remove_breakpoint (CORE_ADDR addr, char *save)
+debug_to_remove_breakpoint (CORE_ADDR addr, bfd_byte *save)
 {
   int retval;
 
This page took 0.027588 seconds and 4 git commands to generate.