public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] gdb: use ptid_t::to_string in print_target_wait_results
@ 2021-08-05 16:14 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2021-08-05 16:14 UTC (permalink / raw)
  To: gdb-patches

The ptid_t::to_string method was introduced recently, to format a ptid_t
for debug purposes.  It formats the ptid exactly as is done in
print_target_wait_results, so make print_target_wait_results use it.

Change-Id: I0a81c8040d3e1858fb304cb28366b34d94eefe4d
---
 gdb/infrun.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6c42c48d87cb..8870f82b9cc3 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3442,15 +3442,11 @@ void
 print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid,
 			   const struct target_waitstatus *ws)
 {
-  infrun_debug_printf ("target_wait (%d.%ld.%ld [%s], status) =",
-		       waiton_ptid.pid (),
-		       waiton_ptid.lwp (),
-		       waiton_ptid.tid (),
+  infrun_debug_printf ("target_wait (%s [%s], status) =",
+		       waiton_ptid.to_string ().c_str (),
 		       target_pid_to_str (waiton_ptid).c_str ());
-  infrun_debug_printf ("  %d.%ld.%ld [%s],",
-		       result_ptid.pid (),
-		       result_ptid.lwp (),
-		       result_ptid.tid (),
+  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 ());
 }
-- 
2.32.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 16:14 [pushed] gdb: use ptid_t::to_string in print_target_wait_results Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).