aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-24 22:15:42 -0700
committerTom Tromey <tom@tromey.com>2022-01-05 11:36:33 -0700
commit56c5b29b616e95749d0c99f936340897e14ab252 (patch)
treee6111e339eb0fa728668d3e9447a88d6b7385815
parent7f762abff6e7b2e48c1f4a1d0a087ce4eb5677a7 (diff)
downloadgdb-56c5b29b616e95749d0c99f936340897e14ab252.zip
gdb-56c5b29b616e95749d0c99f936340897e14ab252.tar.gz
gdb-56c5b29b616e95749d0c99f936340897e14ab252.tar.bz2
Use filtered output in *-tdep commands
Various targets introduce their own commands, which then use unfiltered output. It's better to use filtered output by default, so this patch fixes the instances I found.
-rw-r--r--gdb/avr-tdep.c2
-rw-r--r--gdb/hppa-tdep.c30
-rw-r--r--gdb/i386-tdep.c6
-rw-r--r--gdb/mips-tdep.c6
-rw-r--r--gdb/s12z-tdep.c2
5 files changed, 23 insertions, 23 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 9ead25d..7f79ef9 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1589,7 +1589,7 @@ avr_io_reg_read_command (const char *args, int from_tty)
return;
}
- printf_unfiltered (_("Target has %u io registers:\n\n"), nreg);
+ printf_filtered (_("Target has %u io registers:\n\n"), nreg);
/* only fetch up to 8 registers at a time to keep the buffer small */
int step = 8;
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 6c6e538..32c5435 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -2572,19 +2572,19 @@ unwind_command (const char *exp, int from_tty)
if (!u)
{
- printf_unfiltered ("Can't find unwind table entry for %s\n", exp);
+ printf_filtered ("Can't find unwind table entry for %s\n", exp);
return;
}
- printf_unfiltered ("unwind_table_entry (%s):\n", host_address_to_string (u));
+ printf_filtered ("unwind_table_entry (%s):\n", host_address_to_string (u));
- printf_unfiltered ("\tregion_start = %s\n", hex_string (u->region_start));
+ printf_filtered ("\tregion_start = %s\n", hex_string (u->region_start));
- printf_unfiltered ("\tregion_end = %s\n", hex_string (u->region_end));
+ printf_filtered ("\tregion_end = %s\n", hex_string (u->region_end));
-#define pif(FLD) if (u->FLD) printf_unfiltered (" "#FLD);
+#define pif(FLD) if (u->FLD) printf_filtered (" "#FLD);
- printf_unfiltered ("\n\tflags =");
+ printf_filtered ("\n\tflags =");
pif (Cannot_unwind);
pif (Millicode);
pif (Millicode_save_sr0);
@@ -2609,9 +2609,9 @@ unwind_command (const char *exp, int from_tty)
pif (Large_frame);
pif (alloca_frame);
- putchar_unfiltered ('\n');
+ putchar_filtered ('\n');
-#define pin(FLD) printf_unfiltered ("\t"#FLD" = 0x%x\n", u->FLD);
+#define pin(FLD) printf_filtered ("\t"#FLD" = 0x%x\n", u->FLD);
pin (Region_description);
pin (Entry_FR);
@@ -2620,26 +2620,26 @@ unwind_command (const char *exp, int from_tty)
if (u->stub_unwind.stub_type)
{
- printf_unfiltered ("\tstub type = ");
+ printf_filtered ("\tstub type = ");
switch (u->stub_unwind.stub_type)
{
case LONG_BRANCH:
- printf_unfiltered ("long branch\n");
+ printf_filtered ("long branch\n");
break;
case PARAMETER_RELOCATION:
- printf_unfiltered ("parameter relocation\n");
+ printf_filtered ("parameter relocation\n");
break;
case EXPORT:
- printf_unfiltered ("export\n");
+ printf_filtered ("export\n");
break;
case IMPORT:
- printf_unfiltered ("import\n");
+ printf_filtered ("import\n");
break;
case IMPORT_SHLIB:
- printf_unfiltered ("import shlib\n");
+ printf_filtered ("import shlib\n");
break;
default:
- printf_unfiltered ("unknown (%d)\n", u->stub_unwind.stub_type);
+ printf_filtered ("unknown (%d)\n", u->stub_unwind.stub_type);
}
}
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 6d8a43f..aaa5592 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -8992,14 +8992,14 @@ i386_mpx_info_bounds (const char *args, int from_tty)
if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_i386
|| !i386_mpx_enabled ())
{
- printf_unfiltered (_("Intel Memory Protection Extensions not "
- "supported on this target.\n"));
+ printf_filtered (_("Intel Memory Protection Extensions not "
+ "supported on this target.\n"));
return;
}
if (args == NULL)
{
- printf_unfiltered (_("Address of pointer variable expected.\n"));
+ printf_filtered (_("Address of pointer variable expected.\n"));
return;
}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 7f80183..e5f8c6b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -6916,7 +6916,7 @@ show_mipsfpu_command (const char *args, int from_tty)
if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_mips)
{
- printf_unfiltered
+ printf_filtered
("The MIPS floating-point coprocessor is unknown "
"because the current architecture is not MIPS.\n");
return;
@@ -6937,11 +6937,11 @@ show_mipsfpu_command (const char *args, int from_tty)
internal_error (__FILE__, __LINE__, _("bad switch"));
}
if (mips_fpu_type_auto)
- printf_unfiltered ("The MIPS floating-point coprocessor "
+ printf_filtered ("The MIPS floating-point coprocessor "
"is set automatically (currently %s)\n",
fpu);
else
- printf_unfiltered
+ printf_filtered
("The MIPS floating-point coprocessor is assumed to be %s\n", fpu);
}
diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c
index 24ebc6a..3f9740f 100644
--- a/gdb/s12z-tdep.c
+++ b/gdb/s12z-tdep.c
@@ -635,7 +635,7 @@ show_bdccsr_command (const char *args, int from_tty)
struct string_file output;
target_rcmd ("bdccsr", &output);
- printf_unfiltered ("The current BDCCSR value is %s\n", output.string().c_str());
+ printf_filtered ("The current BDCCSR value is %s\n", output.string().c_str());
}
static struct gdbarch *