Change pid_to_str to return std::string
[deliverable/binutils-gdb.git] / gdb / i386-cygwin-tdep.c
index e6a9f8289294c41e1be3db07dc01c4220ab66721..1acd37975ee8c26dfe2873ab76e1909d21394691 100644 (file)
@@ -178,16 +178,11 @@ windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
 
 /* This is how we want PTIDs from core files to be printed.  */
 
-static const char *
+static std::string
 i386_windows_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
 {
-  static char buf[80];
-
   if (ptid.lwp () != 0)
-    {
-      snprintf (buf, sizeof (buf), "Thread 0x%lx", ptid.lwp ());
-      return buf;
-    }
+    return string_printf ("Thread 0x%lx", ptid.lwp ());
 
   return normal_pid_to_str (ptid);
 }
This page took 0.035039 seconds and 4 git commands to generate.