mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 02:53:48 +08:00
* target.c (normal_pid_to_str): Use xsnprintf instead of snprintf.
* bsd-uthread.c (bsd_uthread_pid_to_str): Likewise. * inf-ttrace.c (inf_ttrace_pid_to_str): Likewise.
This commit is contained in:
parent
a7aad9aa6a
commit
5fff8fc01d
@ -1,5 +1,9 @@
|
||||
2005-07-18 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* target.c (normal_pid_to_str): Use xsnprintf instead of snprintf.
|
||||
* bsd-uthread.c (bsd_uthread_pid_to_str): Likewise.
|
||||
* inf-ttrace.c (inf_ttrace_pid_to_str): Likewise.
|
||||
|
||||
* hppa-tdep.h (hppa_frame_prev_register_helper): Change types of
|
||||
last argument to `gdb_byte *'.
|
||||
* hppa-tdep.c (hppa32_convert_from_func_ptr_addr): Rewrite.
|
||||
|
@ -469,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;
|
||||
}
|
||||
|
||||
|
@ -909,11 +909,9 @@ inf_ttrace_pid_to_str (ptid_t ptid)
|
||||
pid_t pid = ptid_get_pid (ptid);
|
||||
lwpid_t lwpid = ptid_get_lwp (ptid);
|
||||
static char buf[128];
|
||||
int size;
|
||||
|
||||
size = snprintf (buf, sizeof buf, "process %ld, lwp %ld",
|
||||
(long)pid, (long)lwpid);
|
||||
gdb_assert (size < sizeof buf);
|
||||
xsnprintf (buf, sizeof buf, "process %ld, lwp %ld",
|
||||
(long)pid, (long)lwpid);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
@ -1793,10 +1793,8 @@ char *
|
||||
normal_pid_to_str (ptid_t ptid)
|
||||
{
|
||||
static char buf[32];
|
||||
int size;
|
||||
|
||||
size = snprintf (buf, sizeof buf, "process %d", ptid_get_pid (ptid));
|
||||
gdb_assert (size < sizeof buf);
|
||||
xsnprintf (buf, sizeof buf, "process %d", ptid_get_pid (ptid));
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user