summaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 8d594138e55..77bc7142865 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -414,16 +414,11 @@ linux_has_shared_address_space (struct gdbarch *gdbarch)
/* This is how we want PTIDs from core files to be printed. */
-static const char *
+static std::string
linux_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
{
- static char buf[80];
-
if (ptid.lwp () != 0)
- {
- snprintf (buf, sizeof (buf), "LWP %ld", ptid.lwp ());
- return buf;
- }
+ return string_printf ("LWP %ld", ptid.lwp ());
return normal_pid_to_str (ptid);
}