[1/2] Fix output indentation for "info pretty-printers"

Message ID 20181107045624.30582-2-tom@tromey.com
State New
Headers show
Series
  • Two trivial output changes
Related show

Commit Message

Tom Tromey Nov. 7, 2018, 4:56 a.m.
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-06  Tom Tromey  <tom@tromey.com>

	* python/lib/gdb/command/pretty_printers.py
	(InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
---
 gdb/ChangeLog                                 | 5 +++++
 gdb/python/lib/gdb/command/pretty_printers.py | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

-- 
2.17.2

Patch

diff --git a/gdb/python/lib/gdb/command/pretty_printers.py b/gdb/python/lib/gdb/command/pretty_printers.py
index 429505f93e..9788218942 100644
--- a/gdb/python/lib/gdb/command/pretty_printers.py
+++ b/gdb/python/lib/gdb/command/pretty_printers.py
@@ -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)