/* BSD user-level threads support.
- Copyright 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GDB.
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"
#include "objfiles.h"
#include "observer.h"
#include "regcache.h"
+#include "solib.h"
#include "solist.h"
#include "symfile.h"
#include "target.h"
ULONGEST magic = read_memory_unsigned_integer (addr, 4);
if (magic != BSD_UTHREAD_PTHREAD_MAGIC)
- error ("Bad magic");
+ error (_("Bad magic"));
}
/* Thread states. */
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,
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
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;
}