diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-04-19 15:46:52 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2024-04-19 16:30:25 -0400 |
commit | b38f70086dbc2c06ac261829fa31f6cd29d59973 (patch) | |
tree | eac65c487cc32d145d9560994efddc4ebeab7965 /gdb/target-debug.h | |
parent | a887499c6b363aa97a6dd11807878ee9fa406e35 (diff) | |
download | binutils-b38f70086dbc2c06ac261829fa31f6cd29d59973.zip binutils-b38f70086dbc2c06ac261829fa31f6cd29d59973.tar.gz binutils-b38f70086dbc2c06ac261829fa31f6cd29d59973.tar.bz2 |
gdb: make debug_target use one-liners
Turn the debug prints in debug_target's method to be one liners. For
instance, change this:
gdb_printf (gdb_stdlog, "<- %s->wait (", this->beneath ()->shortname ());
gdb_puts (target_debug_print_ptid_t (arg0), gdb_stdlog);
gdb_puts (", ", gdb_stdlog);
gdb_puts (target_debug_print_target_waitstatus_p (arg1), gdb_stdlog);
gdb_puts (", ", gdb_stdlog);
gdb_puts (target_debug_print_target_wait_flags (arg2), gdb_stdlog);
gdb_puts (") = ", gdb_stdlog);
target_debug_print_ptid_t (result);
gdb_puts ("\n", gdb_stdlog);
into this:
gdb_printf (gdb_stdlog,
"<- %s->wait (%s, %s, %s) = %s\n",
this->beneath ()->shortname (),
target_debug_print_ptid_t (arg0).c_str (),
target_debug_print_target_waitstatus_p (arg1).c_str (),
target_debug_print_target_wait_flags (arg2).c_str (),
target_debug_print_ptid_t (result).c_str ());
This makes it possible for a subsequent patch to turn this gdb_printf
call into a `target_debug_printf` call.
Change-Id: I808202438972fac1bba2f8ccb63e66a4fcef20c9
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/target-debug.h')
-rw-r--r-- | gdb/target-debug.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/target-debug.h b/gdb/target-debug.h index efe695e..b5eb338 100644 --- a/gdb/target-debug.h +++ b/gdb/target-debug.h @@ -308,7 +308,7 @@ target_debug_print_target_waitstatus_p (struct target_waitstatus *status) /* Functions that are used via TARGET_DEBUG_PRINTER. */ -static const char * +static std::string target_debug_print_step (int step) { return step ? "step" : "continue"; } @@ -331,7 +331,7 @@ target_debug_print_signals (gdb::array_view<const unsigned char> sigs) return s; } -static const char * +static std::string target_debug_print_size_t (size_t size) { return pulongest (size); |