/* BSD user-level threads support.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
This file is part of GDB.
const char *extra_thread_info (struct thread_info *) override;
- const char *pid_to_str (ptid_t) override;
+ std::string pid_to_str (ptid_t) override;
};
static bsd_uthread_target bsd_uthread_ops;
return NULL;
}
-const char *
+std::string
bsd_uthread_target::pid_to_str (ptid_t ptid)
{
if (ptid.tid () != 0)
- {
- static char buf[64];
-
- xsnprintf (buf, sizeof buf, "process %d, thread 0x%lx",
- ptid.pid (), ptid.tid ());
- return buf;
- }
+ return string_printf ("process %d, thread 0x%lx",
+ ptid.pid (), ptid.tid ());
return normal_pid_to_str (ptid);
}