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/tracepoint.c | |
parent | a1723c35ac1fdb9cd0f250546c914122ad39f8c3 (diff) | |
download | gdb-6cebaf6e1ae4a9f02d9d9136fccbab1ef06b1b6e.zip gdb-6cebaf6e1ae4a9f02d9d9136fccbab1ef06b1b6e.tar.gz gdb-6cebaf6e1ae4a9f02d9d9136fccbab1ef06b1b6e.tar.bz2 |
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/tracepoint.c')
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index c2d7da8..f068ce4 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -6723,7 +6723,7 @@ gdb_ust_connect_sync_socket (int pid) int res, fd; char path[UNIX_PATH_MAX]; - res = snprintf (path, UNIX_PATH_MAX, "%s/gdb_ust%d", SOCK_DIR, pid); + res = xsnprintf (path, UNIX_PATH_MAX, "%s/gdb_ust%d", SOCK_DIR, pid); if (res >= UNIX_PATH_MAX) { trace_debug ("string overflow allocating socket name"); @@ -6739,7 +6739,7 @@ gdb_ust_connect_sync_socket (int pid) addr.sun_family = AF_UNIX; - res = snprintf (addr.sun_path, UNIX_PATH_MAX, "%s", path); + res = xsnprintf (addr.sun_path, UNIX_PATH_MAX, "%s", path); if (res >= UNIX_PATH_MAX) { warning ("string overflow allocating socket name\n"); @@ -6964,8 +6964,8 @@ gdb_ust_socket_init (void) int result, fd; char name[UNIX_PATH_MAX]; - result = snprintf (name, UNIX_PATH_MAX, "%s/gdb_ust%d", - SOCK_DIR, getpid ()); + result = xsnprintf (name, UNIX_PATH_MAX, "%s/gdb_ust%d", + SOCK_DIR, getpid ()); if (result >= UNIX_PATH_MAX) { trace_debug ("string overflow allocating socket name"); |