Change pid_to_str to return std::string
[deliverable/binutils-gdb.git] / gdb / fbsd-tdep.c
index f06836216d9ed865668834c753579fd6d1961f1e..cd207d88bc384f097fa42f72402537783d8b9248 100644 (file)
@@ -482,16 +482,11 @@ fbsd_pspace_data_cleanup (struct program_space *pspace, void *data)
 
 /* This is how we want PTIDs from core files to be printed.  */
 
-static const char *
+static std::string
 fbsd_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
 {
-  static char buf[80];
-
   if (ptid.lwp () != 0)
-    {
-      xsnprintf (buf, sizeof buf, "LWP %ld", ptid.lwp ());
-      return buf;
-    }
+    return string_printf ("LWP %ld", ptid.lwp ());
 
   return normal_pid_to_str (ptid);
 }
This page took 0.023729 seconds and 4 git commands to generate.