aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-11 14:57:17 -0700
committerTom Tromey <tom@tromey.com>2021-12-20 09:49:41 -0700
commit6bebf813ac2d4b92facae7b18161aad1b734a894 (patch)
treeaaa28c29f4665e5db0bf87e0167f88122e55b433 /gdb/compile
parentb0715493df19e5223251c5be0efc7f180aa0a5ff (diff)
downloadgdb-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/compile')
-rw-r--r--gdb/compile/compile-loc2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index fb1a4ff..bc74ca5 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -675,7 +675,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream,
uint64_t uoffset, reg;
int64_t offset;
- print_spaces (indent - 2, stream);
+ stream->printf ("%*s", indent - 2, "");
if (info[op_ptr - base].label)
{
print_label (stream, scope, op_ptr - base);