#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
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;
/* 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