diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-22 11:27:29 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-11-22 13:57:43 -0500 |
commit | 7dca2ea7ff4c2c786119e13e81a5e6b0c1bf1d2d (patch) | |
tree | 11f65eb07e8a35b04dd4fda44eca976d8c6d9f23 /gdb/infrun.c | |
parent | a58577878b19cb2e6ebbfdbff557203c344955b1 (diff) | |
download | binutils-7dca2ea7ff4c2c786119e13e81a5e6b0c1bf1d2d.zip binutils-7dca2ea7ff4c2c786119e13e81a5e6b0c1bf1d2d.tar.gz binutils-7dca2ea7ff4c2c786119e13e81a5e6b0c1bf1d2d.tar.bz2 |
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
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 89a98c2..dba4f33 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2214,7 +2214,7 @@ resume_1 (enum gdb_signal sig) ("thread %s has pending wait " "status %s (currently_stepping=%d).", tp->ptid.to_string ().c_str (), - target_waitstatus_to_string (&tp->pending_waitstatus ()).c_str (), + tp->pending_waitstatus ().to_string ().c_str (), currently_stepping (tp)); tp->inf->process_target ()->threads_executing = true; @@ -2632,7 +2632,7 @@ clear_proceed_status_thread (struct thread_info *tp) infrun_debug_printf ("thread %s has pending wait status %s (currently_stepping=%d).", tp->ptid.to_string ().c_str (), - target_waitstatus_to_string (&tp->pending_waitstatus ()).c_str (), + tp->pending_waitstatus ().to_string ().c_str (), currently_stepping (tp)); } } @@ -3478,7 +3478,7 @@ print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid, infrun_debug_printf (" %s [%s],", result_ptid.to_string ().c_str (), target_pid_to_str (result_ptid).c_str ()); - infrun_debug_printf (" %s", target_waitstatus_to_string (ws).c_str ()); + infrun_debug_printf (" %s", ws->to_string ().c_str ()); } /* Select a thread at random, out of those which are resumed and have @@ -3584,8 +3584,7 @@ do_target_wait_1 (inferior *inf, ptid_t ptid, if (tp != NULL) { infrun_debug_printf ("Using pending wait status %s for %s.", - target_waitstatus_to_string - (&tp->pending_waitstatus ()).c_str (), + tp->pending_waitstatus ().to_string ().c_str (), tp->ptid.to_string ().c_str ()); /* Now that we've selected our final event LWP, un-adjust its PC @@ -4678,7 +4677,7 @@ static void save_waitstatus (struct thread_info *tp, const target_waitstatus *ws) { infrun_debug_printf ("saving status %s for %s", - target_waitstatus_to_string (ws).c_str (), + ws->to_string ().c_str (), tp->ptid.to_string ().c_str ()); /* Record for later. */ @@ -4769,7 +4768,7 @@ static bool handle_one (const wait_one_event &event) { infrun_debug_printf - ("%s %s", target_waitstatus_to_string (&event.ws).c_str (), + ("%s %s", event.ws.to_string ().c_str (), event.ptid.to_string ().c_str ()); if (event.ws.kind () == TARGET_WAITKIND_NO_RESUMED) @@ -4875,7 +4874,7 @@ handle_one (const wait_one_event &event) infrun_debug_printf ("target_wait %s, saving status for %s", - target_waitstatus_to_string (&event.ws).c_str (), + event.ws.to_string ().c_str (), t->ptid.to_string ().c_str ()); /* Record for later. */ @@ -5181,7 +5180,7 @@ handle_inferior_event (struct execution_control_state *ecs) end. */ scoped_value_mark free_values; - infrun_debug_printf ("%s", target_waitstatus_to_string (&ecs->ws).c_str ()); + infrun_debug_printf ("%s", ecs->ws.to_string ().c_str ()); if (ecs->ws.kind () == TARGET_WAITKIND_IGNORE) { |