diff options
author | Andreas Arnez <arnez@vnet.linux.ibm.com> | 2014-12-16 16:06:42 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-12-16 16:06:42 +0100 |
commit | 25dda427ec9e074e0a258eb93c7cc811f0a85a9c (patch) | |
tree | 0617f7d4e2a0b71a35f685566710a61fed4309da /gdb/testsuite/gdb.base/completion.exp | |
parent | 033539e2685156ad6ad60e5925bc61cef5ced483 (diff) | |
download | gdb-25dda427ec9e074e0a258eb93c7cc811f0a85a9c.zip gdb-25dda427ec9e074e0a258eb93c7cc811f0a85a9c.tar.gz gdb-25dda427ec9e074e0a258eb93c7cc811f0a85a9c.tar.bz2 |
Fix indentation of "maint print user-registers"
This fixes a failure of the test case "complete 'info registers '" in
completion.exp on architectures where the user registers have numbers
above 99. In that case the output of "maint print user-registers" was
no longer indented, and the regexp in the test case failed to add them
to the list of expected completion results. The fix also swaps the
columns "Name" and "Nr", such that the indentation is always the same,
and to be consistent with the output of "maint print registers".
gdb/ChangeLog:
* user-regs.c (maintenance_print_user_registers): Swap "Nr" and
"Name" columns. Assure that the output is always indented.
gdb/testsuite/ChangeLog:
* gdb.base/completion.exp: Adjust to format changes of "maint
print user-registers".
Diffstat (limited to 'gdb/testsuite/gdb.base/completion.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 08e1a52..9c79a29 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -145,17 +145,14 @@ set regs_output [capture_command_output "mt print registers" \ append regs_output "\n" append regs_output [capture_command_output "mt print reggroups" \ ".*Group.*Type\[^\n]*\n"] +append regs_output "\n" +append regs_output [capture_command_output "mt print user-registers" \ + ".*Name.*Nr\[^\n]*\n"] set all_regs {} foreach {- reg} [regexp -all -inline -line {^\s+(\w+)} $regs_output] { lappend all_regs $reg } -set regs_output [capture_command_output "mt print user-registers" \ - ".*Nr.*Name\[^\n]*\n"] -foreach {- reg} [regexp -all -inline -line {^\s+\d+\s+(\w+)} $regs_output] { - lappend all_regs $reg -} - set all_regs [join [lsort -unique $all_regs]] # ... and then compare them to the completion of "info registers". |