2006-02-21 Paul Brook <paul@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / bsd-uthread.c
index 28d3d25de4d0e75b6c2ce8247b7802cdcbcc0135..01acd499a7805d5de4ff76f56abadf1a976229f1 100644 (file)
@@ -1,6 +1,6 @@
 /* BSD user-level threads support.
 
-   Copyright 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,8 +16,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "gdbcore.h"
@@ -320,8 +320,9 @@ bsd_uthread_store_registers (int regnum)
 
 static LONGEST
 bsd_uthread_xfer_partial (struct target_ops *ops, enum target_object object,
-                         const char *annex, void *readbuf,
-                         const void *writebuf, ULONGEST offset, LONGEST len)
+                         const char *annex, gdb_byte *readbuf,
+                         const gdb_byte *writebuf,
+                         ULONGEST offset, LONGEST len)
 {
   gdb_assert (ops->beneath->to_xfer_partial);
   return ops->beneath->to_xfer_partial (ops->beneath, object, annex, readbuf,
@@ -342,7 +343,7 @@ bsd_uthread_wait (ptid_t ptid, struct target_waitstatus *status)
                                    builtin_type_void_data_ptr);
   if (addr != 0)
     {
-      char buf[4];
+      gdb_byte buf[4];
 
       /* FIXME: For executables linked statically with the threads
          library, we end up here before the program has actually been
@@ -468,11 +469,9 @@ bsd_uthread_pid_to_str (ptid_t ptid)
   if (ptid_get_tid (ptid) != 0)
     {
       static char buf[64];
-      int size;
 
-      size = snprintf (buf, sizeof buf, "process %d, thread 0x%lx",
-                      ptid_get_pid (ptid), ptid_get_tid (ptid));
-      gdb_assert (size < sizeof buf);
+      xsnprintf (buf, sizeof buf, "process %d, thread 0x%lx",
+                ptid_get_pid (ptid), ptid_get_tid (ptid));
       return buf;
     }
 
This page took 0.024454 seconds and 4 git commands to generate.