Fix output indentation for "info pretty-printers"
authorTom Tromey <tom@tromey.com>
Wed, 7 Nov 2018 03:09:20 +0000 (20:09 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 8 Nov 2018 23:17:01 +0000 (16:17 -0700)
I noticed that "info pretty-printers" will indent the "objfile" line
like:

    (top-gdb) info pretty-printer
    global pretty-printers:
      builtin
mpx_bound128
      objfile /home/tromey/gdb/build/gdb/gdb pretty-printers:
      type_lookup_function

I think the "objfile" line should be "out-dented", following the same
style as the "global" and "progspace" (not shown) lines.

This patch implements this.

gdb/ChangeLog
2018-11-08  Tom Tromey  <tom@tromey.com>

* python/lib/gdb/command/pretty_printers.py
(InfoPrettyPrinter.invoke): Don't indent "objfile" heading.

gdb/ChangeLog
gdb/python/lib/gdb/command/pretty_printers.py

index 3a4db38e05e993d1a13c5ec258c54fc632dec370..8bb9685701ad362b371f727d4ac5fa73d390a2cf 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-08  Tom Tromey  <tom@tromey.com>
+
+       * python/lib/gdb/command/pretty_printers.py
+       (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
+
 2018-11-08  Tom Tromey  <tom@tromey.com>
 
        PR gdb/23555:
index 429505f93ecef7db568f4fd8347ffe03f80c7a0b..9788218942bda2e1c8709e2f3321cb7eaf9f7e65 100644 (file)
@@ -158,7 +158,7 @@ printer-name;subprinter-name."""
                      cp.pretty_printers, "progspace",
                      object_re, name_re, subname_re)
         for objfile in gdb.objfiles():
-            self.invoke1("  objfile %s pretty-printers:" % objfile.filename,
+            self.invoke1("objfile %s pretty-printers:" % objfile.filename,
                          objfile.pretty_printers, objfile.filename,
                          object_re, name_re, subname_re)