diff options
author | gdbadmin <gdbadmin@sourceware.org> | 2010-09-01 01:53:43 +0000 |
---|---|---|
committer | gdbadmin <gdbadmin@sourceware.org> | 2010-09-01 01:53:43 +0000 |
commit | 6cebaf6e1ae4a9f02d9d9136fccbab1ef06b1b6e (patch) | |
tree | 94bcdb617fd5dc4078b5a0fa92cad8c45e048a9e /gdb/gdbserver/target.c | |
parent | a1723c35ac1fdb9cd0f250546c914122ad39f8c3 (diff) | |
download | binutils-gdb-6cebaf6e1ae4a9f02d9d9136fccbab1ef06b1b6e.tar.gz |
use xsnprintf instead of snprintf.
snprintf is not available on LynxOS, so I changed the calls to snprintf
to calls to xsnprintf, which should be strictly equivalent.
gdb/gdbserver/ChangeLog:
* utils.c (xsnprintf): Make non-static.
* server.h: Add xsnprintf declaration.
* linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
replace calls to snprintf by calls to xsnprintf throughout.
Diffstat (limited to 'gdb/gdbserver/target.c')
-rw-r--r-- | gdb/gdbserver/target.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index 4fc8c07597f..21dd377f995 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -139,18 +139,18 @@ target_pid_to_str (ptid_t ptid) static char buf[80]; if (ptid_equal (ptid, minus_one_ptid)) - snprintf (buf, sizeof (buf), "<all threads>"); + xsnprintf (buf, sizeof (buf), "<all threads>"); else if (ptid_equal (ptid, null_ptid)) - snprintf (buf, sizeof (buf), "<null thread>"); + xsnprintf (buf, sizeof (buf), "<null thread>"); else if (ptid_get_tid (ptid) != 0) - snprintf (buf, sizeof (buf), "Thread %d.0x%lx", - ptid_get_pid (ptid), ptid_get_tid (ptid)); + xsnprintf (buf, sizeof (buf), "Thread %d.0x%lx", + ptid_get_pid (ptid), ptid_get_tid (ptid)); else if (ptid_get_lwp (ptid) != 0) - snprintf (buf, sizeof (buf), "LWP %d.%ld", - ptid_get_pid (ptid), ptid_get_lwp (ptid)); + xsnprintf (buf, sizeof (buf), "LWP %d.%ld", + ptid_get_pid (ptid), ptid_get_lwp (ptid)); else - snprintf (buf, sizeof (buf), "Process %d", - ptid_get_pid (ptid)); + xsnprintf (buf, sizeof (buf), "Process %d", + ptid_get_pid (ptid)); return buf; } |