diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-11 14:57:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-12-20 09:49:41 -0700 |
commit | 6bebf813ac2d4b92facae7b18161aad1b734a894 (patch) | |
tree | aaa28c29f4665e5db0bf87e0167f88122e55b433 /gdb/symmisc.c | |
parent | b0715493df19e5223251c5be0efc7f180aa0a5ff (diff) | |
download | gdb-6bebf813ac2d4b92facae7b18161aad1b734a894.zip gdb-6bebf813ac2d4b92facae7b18161aad1b734a894.tar.gz gdb-6bebf813ac2d4b92facae7b18161aad1b734a894.tar.bz2 |
Remove print_spaces
This removes the print_spaces helper function, in favor of using the
"*%s" idiom that's already used in many places in gdb. One spot (in
symmisc.c) is changed to use print_spaces_filtered, because the rest
of that function is using filtered output. (This highlights one way
that the printf idiom is better -- this error is harder to make when
using that.)
Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 7e21559..ca15ab4 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -286,8 +286,8 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) { b = BLOCKVECTOR_BLOCK (bv, i); depth = block_depth (b) * 2; - print_spaces (depth, outfile); - fprintf_filtered (outfile, "block #%03d, object at ", i); + fprintf_filtered (outfile, "%*sblock #%03d, object at ", + depth, "", i); gdb_print_host_address (b, outfile); if (BLOCK_SUPERBLOCK (b)) { @@ -510,7 +510,7 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, else section = NULL; - print_spaces (depth, outfile); + print_spaces_filtered (depth, outfile); if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN) { fprintf_filtered (outfile, "label %s at ", symbol->print_name ()); |