gdb: rename target_waitstatus_to_string to target_waitstatus::to_string

Make target_waitstatus_to_string a "to_string" method of
target_waitstatus, a bit like we have ptid_t::to_string already.  This
will save a bit of typing.

Change-Id: Id261b7a09fa9fa3c738abac131c191a6f9c13905
This commit is contained in:
Simon Marchi
2021-11-22 11:27:29 -05:00
committed by Simon Marchi
parent a58577878b
commit 7dca2ea7ff
8 changed files with 33 additions and 44 deletions

View File

@@ -3305,14 +3305,9 @@ queue_stop_reply_callback (thread_info *thread)
if (target_thread_stopped (thread))
{
if (debug_threads)
{
std::string status_string
= target_waitstatus_to_string (&thread->last_status);
debug_printf ("Reporting thread %s as already stopped with %s\n",
target_pid_to_str (thread->id).c_str (),
status_string.c_str ());
}
debug_printf ("Reporting thread %s as already stopped with %s\n",
target_pid_to_str (thread->id).c_str (),
thread->last_status.to_string ().c_str ());
gdb_assert (thread->last_status.kind () != TARGET_WAITKIND_IGNORE);