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

@@ -3445,13 +3445,9 @@ linux_process_target::wait_1 (ptid_t ptid, target_waitstatus *ourstatus,
if (debug_threads)
{
if (event_child->waitstatus.kind () != TARGET_WAITKIND_IGNORE)
{
std::string str
= target_waitstatus_to_string (&event_child->waitstatus);
debug_printf ("LWP %ld: extended event with waitstatus %s\n",
lwpid_of (get_lwp_thread (event_child)), str.c_str ());
}
debug_printf ("LWP %ld: extended event with waitstatus %s\n",
lwpid_of (get_lwp_thread (event_child)),
event_child->waitstatus.to_string ().c_str ());
if (current_thread->last_resume_kind == resume_step)
{
if (event_child->step_range_start == event_child->step_range_end)