Silence ARI for valid calls to abort
[deliverable/binutils-gdb.git] / gdb / aix-thread.c
index 655c085734c1326b83081774d36784b88fdb77b6..35b77fe4ec0c719d41344c02c7ab2839f8f91c9c 100644 (file)
@@ -61,7 +61,7 @@ extern int getthrds (pid_t, struct thrdsinfo64 *, int, tid_t *, int);
 #endif
 
 /* Whether to emit debugging output.  */
-static int debug_aix_thread;
+static bool debug_aix_thread;
 
 /* In AIX 5.1, functions use pthdb_tid_t instead of tid_t.  */
 #ifndef PTHDB_VERSION_3
@@ -140,7 +140,7 @@ public:
 
   bool thread_alive (ptid_t ptid) override;
 
-  const char *pid_to_str (ptid_t) override;
+  std::string pid_to_str (ptid_t) override;
 
   const char *extra_thread_info (struct thread_info *) override;
 
@@ -1746,20 +1746,13 @@ aix_thread_target::thread_alive (ptid_t ptid)
 /* Return a printable representation of composite PID for use in
    "info threads" output.  */
 
-const char *
+std::string
 aix_thread_target::pid_to_str (ptid_t ptid)
 {
-  static char *ret = NULL;
-
   if (!PD_TID (ptid))
     return beneath ()->pid_to_str (ptid);
 
-  /* Free previous return value; a new one will be allocated by
-     xstrprintf().  */
-  xfree (ret);
-
-  ret = xstrprintf (_("Thread %ld"), ptid.tid ());
-  return ret;
+  return string_printf (_("Thread %ld"), ptid.tid ());
 }
 
 /* Return a printable representation of extra information about
This page took 0.025391 seconds and 4 git commands to generate.