[PATCH 0/2] Two trivial output changes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/2] Two trivial output changes

Tom Tromey-2
I noticed a couple of gdb output oddities, both fixed here.  No new
tests due to their triviality.  Tested by the buildbot.

Tom


Reply | Threaded
Open this post in threaded view
|

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

Tom Tromey-2
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  <[hidden email]>

        * 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(-)

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)
 
--
2.17.2

Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] Capitalize "<TAB>" in require_record_target error

Tom Tromey-2
In reply to this post by Tom Tromey-2
This changes require_record_target to say "<TAB>" rather than "<tab>".
I think capitalizing here is a bit more GNU-ish, based on Emacs usage
and one other case in gdb.

gdb/ChangeLog
2018-11-06  Tom Tromey  <[hidden email]>

        * record.c (require_record_target): Upper-case "<TAB>".
---
 gdb/ChangeLog | 4 ++++
 gdb/record.c  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/record.c b/gdb/record.c
index 2fd77824d4..fdc76f80cc 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -75,7 +75,7 @@ require_record_target (void)
   t = find_record_target ();
   if (t == NULL)
     error (_("No record target is currently active.\n"
-     "Use one of the \"target record-<tab><tab>\" commands first."));
+     "Use one of the \"target record-<TAB><TAB>\" commands first."));
 
   return t;
 }
--
2.17.2

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 0/2] Two trivial output changes

Simon Marchi
In reply to this post by Tom Tromey-2
On 2018-11-06 23:56, Tom Tromey wrote:
> I noticed a couple of gdb output oddities, both fixed here.  No new
> tests due to their triviality.  Tested by the buildbot.
>
> Tom

Both LGTM.

Simon