diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-03-13 22:06:10 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-03-13 22:06:10 +0000 |
commit | fd0a2a6f0c3c52cf0c2219a1711e73d7a3753b17 (patch) | |
tree | 8dc5c1842cdda85b93661febc760dc1c146d8c46 /gdb/remote.c | |
parent | 049742daef2e31e791ee3497a8060a082997e566 (diff) | |
download | gdb-fd0a2a6f0c3c52cf0c2219a1711e73d7a3753b17.zip gdb-fd0a2a6f0c3c52cf0c2219a1711e73d7a3753b17.tar.gz gdb-fd0a2a6f0c3c52cf0c2219a1711e73d7a3753b17.tar.bz2 |
* inf-ttrace.c (inf_ttrace_pid_to_str): Use snprintf instead of
sprintf.
* target.c (normal_pid_to_str): Likewise.
* remote.c (remote_pid_to_str): Use snprint instead of sprintf.
Change capitalization of "thread". Use ptid_get_pid instead of
GETPID.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 317a7d5..ed57631 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5322,9 +5322,11 @@ Fetch and print the remote list of thread identifiers, one pkt only")); static char * remote_pid_to_str (ptid_t ptid) { - static char buf[30]; + static char buf[32]; + int size; - sprintf (buf, "Thread %d", PIDGET (ptid)); + size = snprintf (buf, sizeof buf, "thread %d", ptid_get_pid (ptid)); + gdb_assert (size < sizeof buf); return buf; } |