aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-05-26 23:23:23 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-06-13 21:28:53 +0100
commit51f0e40d6502cb873d8120f8bbd5a345db1c5914 (patch)
tree185bb123012a123ffa08aea39e3c611a7568344a /gdb/doc
parent644dbd876c3f39eb1279cec5680e52fa20bb9ac3 (diff)
downloadgdb-51f0e40d6502cb873d8120f8bbd5a345db1c5914.zip
gdb-51f0e40d6502cb873d8120f8bbd5a345db1c5914.tar.gz
gdb-51f0e40d6502cb873d8120f8bbd5a345db1c5914.tar.bz2
gdb: Rework command completion on 'tui reg'.
We previously specified a few known register groups for the 'tui reg' command. Other register groups could be accessed, but only by using the 'tui reg next' command and cycling through all the groups. This commit removes the hard coded sub-commands of 'tui reg' and instead adds dynamic completion of sub-commands based on the architecturally defined register groups, giving immediate access to all available register groups. There is still the 'next' and 'prev' commands for cycling through the register groups if that's wanted. The new code maintains the ability to only enter partial names for register groups, which is something we got for free when using the standard sub-command mechanism. The register (and register group) completer has been changed to use get_current_arch rather than using the architecture of the currently selected frame. When the target is running, this is equivalent, however, when the target is not running, using get_current_arch will provide results from the default architecture. gdb/ChangeLog: * completer.c: Add arch-utils.h include. (enum reg_completer_targets): New enum. (reg_or_group_completer_1): New function containing old reg_or_group_completer, add and use new parameter to control what is completed on. Use get_current_arch rather than architecture of currently selected frame. (reg_or_group_completer): Call new reg_or_group_completer_1. (reggroup_completer): Call new reg_or_group_completer_1. * completer.h (reggroup_completer): Add declaration. * tui/tui-regs.c: Add 'completer.h' include. (tui_reg_next_command): Renamed to... (tui_reg_next): ...this. Adjust parameters and return rather than display new group. (tui_reg_prev_command): Renamed to... (tui_reg_prev): ...this. Adjust parameters and return rather than display new group. (tui_reg_float_command): Delete. (tui_reg_general_command): Delete. (tui_reg_system_command): Delete. (tui_reg_command): Rewrite to perform switching of register group. Add header comment. (tuireglist): Remove. (tui_reggroup_completer): New function. (_initialize_tui_regs): Remove 'tui reg' sub-commands, update creation of 'tui reg' command. * NEWS: Add comment about 'tui reg' changes. gdb/doc/ChangeLog: * gdb.texinfo (TUI Commands): Bring all 'tui reg' commands into a single table entry.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo47
2 files changed, 32 insertions, 20 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 71f4508..4d42a37 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-13 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.texinfo (TUI Commands): Bring all 'tui reg' commands into a
+ single table entry.
+
2015-06-10 Walfred Tedeschi <walfred.tedeschi@intel.com>
* gdb.textinfo (i386): Fix "@end table" end and "@table" placement.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 65c9d4f..faca83e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25038,27 +25038,34 @@ Make the command window active for scrolling.
@kindex refresh
Refresh the screen. This is similar to typing @kbd{C-L}.
-@item tui reg float
+@item tui reg @var{group}
@kindex tui reg
-Show the floating point registers in the register window.
-
-@item tui reg general
-Show the general registers in the register window.
-
-@item tui reg next
-Show the next register group. The list of register groups as well as
-their order is target specific. The predefined register groups are the
-following: @code{general}, @code{float}, @code{system}, @code{vector},
-@code{all}, @code{save}, @code{restore}.
-
-@item tui reg prev
-Show the previous register group. The list of register groups as well
-as their order is target specific. The predefined register groups are
-the following: @code{general}, @code{float}, @code{system},
-@code{vector}, @code{all}, @code{save}, @code{restore}.
-
-@item tui reg system
-Show the system registers in the register window.
+Changes the register group displayed in the tui register window to
+@var{group}. If the register window is not currently displayed this
+command will cause the register window to be displayed. The list of
+register groups, as well as their order is target specific. The
+following groups are available on most targets:
+@table @code
+@item next
+Repeatedly selecting this group will cause the display to cycle
+through all of the available register groups.
+
+@item prev
+Repeatedly selecting this group will cause the display to cycle
+through all of the available register groups in the reverse order to
+@var{next}.
+
+@item general
+Display the general registers.
+@item float
+Display the floating point registers.
+@item system
+Display the system registers.
+@item vector
+Display the vector registers.
+@item all
+Display all registers.
+@end table
@item update
@kindex update