aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-19 22:47:46 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-19 22:47:46 +0000
commit417832958402db68b1c2e3f345881ae0f8630100 (patch)
tree4ad17d4e6d5449aac85f44e67b98c8e768e8b5dd /gdb/tui
parent3024f13a83deadef212a3d8606d3784033615ea2 (diff)
downloadgdb-417832958402db68b1c2e3f345881ae0f8630100.zip
gdb-417832958402db68b1c2e3f345881ae0f8630100.tar.gz
gdb-417832958402db68b1c2e3f345881ae0f8630100.tar.bz2
* tuiWin.c (_initialize_tuiWin): Always define the tui commands;
create the tui class help. * tuiLayout.c (_initialize_tuiLayout): Always define the tui commands. * tuiRegs.c (_initialize_tuiRegs): Likewise. * tuiStack.c (_initialize_tuiStack): Likewise.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/ChangeLog8
-rw-r--r--gdb/tui/tuiLayout.c23
-rw-r--r--gdb/tui/tuiRegs.c6
-rw-r--r--gdb/tui/tuiStack.c11
-rw-r--r--gdb/tui/tuiWin.c65
5 files changed, 56 insertions, 57 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index 8277bbe..59f2b1f 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,11 @@
+2001-07-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * tuiWin.c (_initialize_tuiWin): Always define the tui commands;
+ create the tui class help.
+ * tuiLayout.c (_initialize_tuiLayout): Always define the tui commands.
+ * tuiRegs.c (_initialize_tuiRegs): Likewise.
+ * tuiStack.c (_initialize_tuiStack): Likewise.
+
2001-07-19 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* tuiDisassem.c (tuiVerticalDisassemScroll): Use CORE_ADDR.
diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c
index 18fda58..74c9747 100644
--- a/gdb/tui/tuiLayout.c
+++ b/gdb/tui/tuiLayout.c
@@ -435,10 +435,8 @@ tuiDefaultWinViewportHeight (TuiWinType type, TuiLayoutType layout)
void
_initialize_tuiLayout (void)
{
- if (tui_version)
- {
- add_com ("layout", class_tui, _tuiLayout_command,
- "Change the layout of windows.\n\
+ add_com ("layout", class_tui, _tuiLayout_command,
+ "Change the layout of windows.\n\
Usage: layout prev | next | <layout_name> \n\
Layout names are:\n\
src : Displays source and command windows.\n\
@@ -450,18 +448,15 @@ Layout names are:\n\
source/assembly/command (split) is displayed, \n\
the register window is displayed with \n\
the window that has current logical focus.\n");
- if (xdb_commands)
- {
- add_com ("td", class_tui, _tuiToggleLayout_command,
- "Toggle between Source/Command and Disassembly/Command layouts.\n");
- add_com ("ts", class_tui, _tuiToggleSplitLayout_command,
- "Toggle between Source/Command or Disassembly/Command and \n\
+ if (xdb_commands)
+ {
+ add_com ("td", class_tui, _tuiToggleLayout_command,
+ "Toggle between Source/Command and Disassembly/Command layouts.\n");
+ add_com ("ts", class_tui, _tuiToggleSplitLayout_command,
+ "Toggle between Source/Command or Disassembly/Command and \n\
Source/Disassembly/Command layouts.\n");
- }
}
-
- return;
-} /* _intialize_tuiLayout */
+}
/*************************
diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c
index 6dc6eed..177451f 100644
--- a/gdb/tui/tuiRegs.c
+++ b/gdb/tui/tuiRegs.c
@@ -540,7 +540,7 @@ tuiToggleFloatRegs (void)
void
_initialize_tuiRegs (void)
{
- if (tui_version && xdb_commands)
+ if (xdb_commands)
{
add_com ("fr", class_tui, _tuiShowFloat_command,
"Display only floating point registers\n");
@@ -561,9 +561,7 @@ _initialize_tuiRegs (void)
registers.\n",
&togglelist);
}
-
- return;
-} /* _initialize_tuiRegs */
+}
/*****************************************
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index 80fb33d..ce979dd 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -422,14 +422,9 @@ tui_vShowFrameInfo (va_list args)
void
_initialize_tuiStack (void)
{
- if (tui_version)
- {
- add_com ("update", class_tui, _tuiUpdateLocation_command,
- "Update the source window and locator to display the current execution point.\n");
- }
-
- return;
-} /* _initialize_tuiStack */
+ add_com ("update", class_tui, _tuiUpdateLocation_command,
+ "Update the source window and locator to display the current execution point.\n");
+}
/*****************************************
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 7b8c0e3..ef16704 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -31,6 +31,7 @@
#include "symtab.h"
#include "breakpoint.h"
#include "frame.h"
+#include "cli/cli-cmds.h"
#include "tui.h"
#include "tuiData.h"
@@ -85,51 +86,53 @@ static void _parseScrollingArgs (char *, TuiWinInfoPtr *, int *);
void
_initialize_tuiWin (void)
{
- if (tui_version)
- {
- add_com ("refresh", class_tui, _tuiRefreshAll_command,
- "Refresh the terminal display.\n");
- if (xdb_commands)
- add_com_alias ("U", "refresh", class_tui, 0);
- add_com ("tabset", class_tui, _tuiSetTabWidth_command,
- "Set the width (in characters) of tab stops.\n\
+ /* Define the classes of commands.
+ They will appear in the help list in the reverse of this order. */
+
+ add_cmd ("tui", class_tui, NO_FUNCTION,
+ "Text User Interface commands.",
+ &cmdlist);
+
+ add_com ("refresh", class_tui, _tuiRefreshAll_command,
+ "Refresh the terminal display.\n");
+ if (xdb_commands)
+ add_com_alias ("U", "refresh", class_tui, 0);
+ add_com ("tabset", class_tui, _tuiSetTabWidth_command,
+ "Set the width (in characters) of tab stops.\n\
Usage: tabset <n>\n");
- add_com ("winheight", class_tui, _tuiSetWinHeight_command,
- "Set the height of a specified window.\n\
+ add_com ("winheight", class_tui, _tuiSetWinHeight_command,
+ "Set the height of a specified window.\n\
Usage: winheight <win_name> [+ | -] <#lines>\n\
Window names are:\n\
src : the source window\n\
cmd : the command window\n\
asm : the disassembly window\n\
regs : the register display\n");
- add_com_alias ("wh", "winheight", class_tui, 0);
- add_info ("win", _tuiAllWindowsInfo,
- "List of all displayed windows.\n");
- add_com ("focus", class_tui, _tuiSetFocus_command,
- "Set focus to named window or next/prev window.\n\
+ add_com_alias ("wh", "winheight", class_tui, 0);
+ add_info ("win", _tuiAllWindowsInfo,
+ "List of all displayed windows.\n");
+ add_com ("focus", class_tui, _tuiSetFocus_command,
+ "Set focus to named window or next/prev window.\n\
Usage: focus {<win> | next | prev}\n\
Valid Window names are:\n\
src : the source window\n\
asm : the disassembly window\n\
regs : the register display\n\
cmd : the command window\n");
- add_com_alias ("fs", "focus", class_tui, 0);
- add_com ("+", class_tui, _tuiScrollForward_command,
- "Scroll window forward.\nUsage: + [win] [n]\n");
- add_com ("-", class_tui, _tuiScrollBackward_command,
- "Scroll window backward.\nUsage: - [win] [n]\n");
- add_com ("<", class_tui, _tuiScrollLeft_command,
- "Scroll window forward.\nUsage: < [win] [n]\n");
- add_com (">", class_tui, _tuiScrollRight_command,
- "Scroll window backward.\nUsage: > [win] [n]\n");
- if (xdb_commands)
- add_com ("w", class_xdb, _tuiXDBsetWinHeight_command,
- "XDB compatibility command for setting the height of a command window.\n\
+ add_com_alias ("fs", "focus", class_tui, 0);
+ add_com ("+", class_tui, _tuiScrollForward_command,
+ "Scroll window forward.\nUsage: + [win] [n]\n");
+ add_com ("-", class_tui, _tuiScrollBackward_command,
+ "Scroll window backward.\nUsage: - [win] [n]\n");
+ add_com ("<", class_tui, _tuiScrollLeft_command,
+ "Scroll window forward.\nUsage: < [win] [n]\n");
+ add_com (">", class_tui, _tuiScrollRight_command,
+ "Scroll window backward.\nUsage: > [win] [n]\n");
+ if (xdb_commands)
+ add_com ("w", class_xdb, _tuiXDBsetWinHeight_command,
+ "XDB compatibility command for setting the height of a command window.\n\
Usage: w <#lines>\n");
- }
-
- return;
-} /* _intialize_tuiWin */
+}
/*