diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:46:15 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch) | |
tree | 641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/frame.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.bz2 |
Unify gdb printf functions
Now that filtered and unfiltered output can be treated identically, we
can unify the printf family of functions. This is done under the name
"gdb_printf". Most of this patch was written by script.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index ce95cf8..2b296ed 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -339,7 +339,7 @@ static void show_frame_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Frame debugging is %s.\n"), value); + gdb_printf (file, _("Frame debugging is %s.\n"), value); } /* Implementation of "show backtrace past-main". */ @@ -348,10 +348,10 @@ static void show_backtrace_past_main (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether backtraces should " - "continue past \"main\" is %s.\n"), - value); + gdb_printf (file, + _("Whether backtraces should " + "continue past \"main\" is %s.\n"), + value); } /* Implementation of "show backtrace past-entry". */ @@ -360,9 +360,9 @@ static void show_backtrace_past_entry (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Whether backtraces should continue past the " - "entry point of a program is %s.\n"), - value); + gdb_printf (file, _("Whether backtraces should continue past the " + "entry point of a program is %s.\n"), + value); } /* Implementation of "show backtrace limit". */ @@ -371,10 +371,10 @@ static void show_backtrace_limit (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("An upper bound on the number " - "of backtrace levels is %s.\n"), - value); + gdb_printf (file, + _("An upper bound on the number " + "of backtrace levels is %s.\n"), + value); } /* See frame.h. */ @@ -1238,36 +1238,36 @@ frame_unwind_register_value (frame_info *next_frame, int regnum) { string_file debug_file; - fprintf_unfiltered (&debug_file, " ->"); + gdb_printf (&debug_file, " ->"); if (value_optimized_out (value)) { - fprintf_unfiltered (&debug_file, " "); + gdb_printf (&debug_file, " "); val_print_not_saved (&debug_file); } else { if (VALUE_LVAL (value) == lval_register) - fprintf_unfiltered (&debug_file, " register=%d", - VALUE_REGNUM (value)); + gdb_printf (&debug_file, " register=%d", + VALUE_REGNUM (value)); else if (VALUE_LVAL (value) == lval_memory) - fprintf_unfiltered (&debug_file, " address=%s", - paddress (gdbarch, - value_address (value))); + gdb_printf (&debug_file, " address=%s", + paddress (gdbarch, + value_address (value))); else - fprintf_unfiltered (&debug_file, " computed"); + gdb_printf (&debug_file, " computed"); if (value_lazy (value)) - fprintf_unfiltered (&debug_file, " lazy"); + gdb_printf (&debug_file, " lazy"); else { int i; gdb::array_view<const gdb_byte> buf = value_contents (value); - fprintf_unfiltered (&debug_file, " bytes="); - fprintf_unfiltered (&debug_file, "["); + gdb_printf (&debug_file, " bytes="); + gdb_printf (&debug_file, "["); for (i = 0; i < register_size (gdbarch, regnum); i++) - fprintf_unfiltered (&debug_file, "%02x", buf[i]); - fprintf_unfiltered (&debug_file, "]"); + gdb_printf (&debug_file, "%02x", buf[i]); + gdb_printf (&debug_file, "]"); } } |