aboutsummaryrefslogtreecommitdiff
path: root/gdb/go32-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-12-17 13:29:38 -0700
committerTom Tromey <tromey@adacore.com>2020-12-17 13:29:38 -0700
commit32f47895b5859c1f34abec75478ef55f2d92b023 (patch)
treecf6b98937829b3a3d5801feea8797c3d591aedef /gdb/go32-nat.c
parent85be4f5a8c8bec8d3163585a82e288a4dec08b07 (diff)
downloadfsf-binutils-gdb-32f47895b5859c1f34abec75478ef55f2d92b023.zip
fsf-binutils-gdb-32f47895b5859c1f34abec75478ef55f2d92b023.tar.gz
fsf-binutils-gdb-32f47895b5859c1f34abec75478ef55f2d92b023.tar.bz2
Remove printfi_filtered and fprintfi_filtered
After seeing Simon's patch, I thought maybe it was finally time to remove printfi_filtered and fprintfi_filtered, in favor of using the "%*s" approach to indenting. In this patch I took the straightforward approach of always adding a leading "%*s", even when the format already started with "%s", to avoid the trickier form of: printf ("%*s", -indent, string) Regression tested on x86-64 Fedora 32. Let me know what you think. gdb/ChangeLog 2020-12-17 Tom Tromey <tromey@adacore.com> * gdbtypes.c (print_args, dump_fn_fieldlists, print_cplus_stuff) (print_gnat_stuff, print_fixed_point_type_info) (recursive_dump_type): Update. * go32-nat.c (go32_sysinfo, display_descriptor): Update. * c-typeprint.c (c_type_print_base_struct_union) (c_type_print_base_1): Update. * rust-lang.c (rust_internal_print_type): Update. * f-typeprint.c (f_language::f_type_print_base): Update. * utils.h (fprintfi_filtered, printfi_filtered): Remove. * m2-typeprint.c (m2_record_fields): Update. * p-typeprint.c (pascal_type_print_base): Update. * compile/compile-loc2c.c (push, pushf, unary, binary) (do_compile_dwarf_expr_to_c): Update. * utils.c (fprintfi_filtered, printfi_filtered): Remove.
Diffstat (limited to 'gdb/go32-nat.c')
-rw-r--r--gdb/go32-nat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 24d0c00..3765d53 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -1261,7 +1261,7 @@ go32_sysinfo (const char *arg, int from_tty)
xsnprintf (cpu_string, sizeof (cpu_string), "%s%s Model %d Stepping %d",
intel_p ? "Pentium" : (amd_p ? "AMD" : (hygon_p ? "Hygon" : "ix86")),
cpu_brand, cpu_model, cpuid_eax & 0xf);
- printfi_filtered (31, "%s\n", cpu_string);
+ printf_filtered ("%*s%s\n", 31, "", cpu_string);
if (((cpuid_edx & (6 | (0x0d << 23))) != 0)
|| ((cpuid_edx & 1) == 0)
|| ((amd_p || hygon_p) && (cpuid_edx & (3 << 30)) != 0))
@@ -1372,11 +1372,11 @@ go32_sysinfo (const char *arg, int from_tty)
"%s-bit DPMI, with%s Virtual Memory support\n",
(dpmi_version_data.flags & 1) ? "32" : "16",
(dpmi_version_data.flags & 4) ? "" : "out");
- printfi_filtered (31, "Interrupts reflected to %s mode\n",
+ printf_filtered ("%*sInterrupts reflected to %s mode\n", 31, "",
(dpmi_version_data.flags & 2) ? "V86" : "Real");
- printfi_filtered (31, "Processor type: i%d86\n",
+ printf_filtered ("%*sProcessor type: i%d86\n", 31, "",
dpmi_version_data.cpu);
- printfi_filtered (31, "PIC base interrupt: Master: %#x Slave: %#x\n",
+ printf_filtered ("%*sPIC base interrupt: Master: %#x Slave: %#x\n", 31, "",
dpmi_version_data.master_pic, dpmi_version_data.slave_pic);
/* a_tss is only initialized when the debuggee is first run. */
@@ -1430,8 +1430,8 @@ go32_sysinfo (const char *arg, int from_tty)
__dpmi_int (0x21, &regs);
if ((regs.x.flags & 1) != 0)
regs.h.al = 0;
- printfi_filtered (31, "UMBs %sin DOS memory chain\n",
- regs.h.al == 0 ? "not " : "");
+ printf_filtered ("%*sUMBs %sin DOS memory chain\n", 31, "",
+ regs.h.al == 0 ? "not " : "");
}
}
@@ -1595,7 +1595,7 @@ display_descriptor (unsigned type, unsigned long base_addr, int idx, int force)
break;
case 5:
printf_filtered ("TSS selector=0x%04x", descr.base0);
- printfi_filtered (16, "Task Gate");
+ printf_filtered ("%*sTask Gate", 16, "");
break;
case 6:
case 7: