aboutsummaryrefslogtreecommitdiff
path: root/gdb/ravenscar-thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ravenscar-thread.c')
-rw-r--r--gdb/ravenscar-thread.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index cb4f26a..6636a89 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -110,7 +110,7 @@ struct ravenscar_thread_target final : public target_ops
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;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
@@ -406,13 +406,10 @@ ravenscar_thread_target::thread_alive (ptid_t ptid)
return true;
}
-const char *
+std::string
ravenscar_thread_target::pid_to_str (ptid_t ptid)
{
- static char buf[30];
-
- snprintf (buf, sizeof (buf), "Thread %#x", (int) ptid.tid ());
- return buf;
+ return string_printf ("Thread %#x", (int) ptid.tid ());
}
void