/* 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);
}