mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 05:12:28 +08:00
2004-01-23 Andrew Cagney <cagney@redhat.com>
* printcmd.c (display_command): Replace tui_set_display call with tui_set_layout_for_display_command. * tui/tui.h (enum tui_win_type): Define. (tui_set_layout): Delete declaration. (tui_set_layout_for_display_command): Rename set_tui_layout. * tui/tui-data.h (enum tui_layout_type): Define. * tui/tui-layout.h: Update copyright. Include "tui-data.h" and "tui.h". (tui_add_win_to_layout): Rename tuiAddWinToLayout. (tui_default_win_height): Rename tuiDefaultWinHeight. (tui_default_win_viewport_height): Rename tuiDefaultWinViewportHeight. (tui_set_layout): RenametuiSetLayout. * tui/tui-layout.c: Update references. * tui/tui.c: Update references. * tui/tui-disasm.c: Update references.
This commit is contained in:
@ -1,3 +1,22 @@
|
||||
2004-01-23 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* printcmd.c (display_command): Replace tui_set_display call with
|
||||
tui_set_layout_for_display_command.
|
||||
* tui/tui.h (enum tui_win_type): Define.
|
||||
(tui_set_layout): Delete declaration.
|
||||
(tui_set_layout_for_display_command): Rename set_tui_layout.
|
||||
* tui/tui-data.h (enum tui_layout_type): Define.
|
||||
* tui/tui-layout.h: Update copyright. Include "tui-data.h" and
|
||||
"tui.h".
|
||||
(tui_add_win_to_layout): Rename tuiAddWinToLayout.
|
||||
(tui_default_win_height): Rename tuiDefaultWinHeight.
|
||||
(tui_default_win_viewport_height): Rename
|
||||
tuiDefaultWinViewportHeight.
|
||||
(tui_set_layout): RenametuiSetLayout.
|
||||
* tui/tui-layout.c: Update references.
|
||||
* tui/tui.c: Update references.
|
||||
* tui/tui-disasm.c: Update references.
|
||||
|
||||
2004-01-23 David Carlton <carlton@kealia.com>
|
||||
|
||||
Partial workaround for PR c++/1511:
|
||||
|
@ -1356,7 +1356,7 @@ display_command (char *exp, int from_tty)
|
||||
/* NOTE: cagney/2003-02-13 The `tui_active' was previously
|
||||
`tui_version'. */
|
||||
if (tui_active && *exp == '$')
|
||||
display_it = (tui_set_layout (exp) == TUI_FAILURE);
|
||||
display_it = (tui_set_layout_for_display_command (exp) == TUI_FAILURE);
|
||||
#endif
|
||||
|
||||
if (display_it)
|
||||
|
@ -116,7 +116,7 @@ TuiList, *TuiListPtr;
|
||||
|
||||
|
||||
/* The kinds of layouts available */
|
||||
typedef enum
|
||||
typedef enum tui_layout_type
|
||||
{
|
||||
SRC_COMMAND,
|
||||
DISASSEM_COMMAND,
|
||||
|
@ -279,7 +279,7 @@ tui_show_disassem (CORE_ADDR startAddr)
|
||||
TuiLineOrAddress val;
|
||||
|
||||
val.addr = startAddr;
|
||||
tuiAddWinToLayout (DISASSEM_WIN);
|
||||
tui_add_win_to_layout (DISASSEM_WIN);
|
||||
tuiUpdateSourceWindow (disassemWin, s, val, FALSE);
|
||||
/*
|
||||
** if the focus was in the src win, put it in the asm win, if the
|
||||
@ -364,7 +364,7 @@ tuiGetLowDisassemblyAddress (CORE_ADDR low, CORE_ADDR pc)
|
||||
|
||||
/* Determine where to start the disassembly so that the pc is about in the
|
||||
middle of the viewport. */
|
||||
pos = tuiDefaultWinViewportHeight (DISASSEM_WIN, DISASSEM_COMMAND) / 2;
|
||||
pos = tui_default_win_viewport_height (DISASSEM_WIN, DISASSEM_COMMAND) / 2;
|
||||
pc = tui_find_disassembly_address (pc, -pos);
|
||||
|
||||
if (pc < low)
|
||||
|
@ -128,17 +128,14 @@ showLayout (TuiLayoutType layout)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** tuiSetLayout()
|
||||
** Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
|
||||
** SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
|
||||
** If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
|
||||
** UNDEFINED_LAYOUT, then the data window is populated according
|
||||
** to regsDisplayType.
|
||||
*/
|
||||
TuiStatus
|
||||
tuiSetLayout (TuiLayoutType layoutType,
|
||||
TuiRegisterDisplayType regsDisplayType)
|
||||
/* Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
|
||||
SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
|
||||
If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
|
||||
UNDEFINED_LAYOUT, then the data window is populated according to
|
||||
regsDisplayType. */
|
||||
enum tui_status
|
||||
tui_set_layout (enum tui_layout_type layoutType,
|
||||
enum tui_register_display_type regsDisplayType)
|
||||
{
|
||||
TuiStatus status = TUI_SUCCESS;
|
||||
|
||||
@ -268,14 +265,11 @@ tuiSetLayout (TuiLayoutType layoutType,
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
** tuiAddWinToLayout().
|
||||
** Add the specified window to the layout in a logical way.
|
||||
** This means setting up the most logical layout given the
|
||||
** window to be added.
|
||||
*/
|
||||
/* Add the specified window to the layout in a logical way. This
|
||||
means setting up the most logical layout given the window to be
|
||||
added. */
|
||||
void
|
||||
tuiAddWinToLayout (TuiWinType type)
|
||||
tui_add_win_to_layout (enum tui_win_type type)
|
||||
{
|
||||
TuiLayoutType curLayout = currentLayout ();
|
||||
|
||||
@ -365,14 +359,12 @@ tuiDefaultWinHeight (TuiWinType type, TuiLayoutType layout)
|
||||
} /* tuiDefaultWinHeight */
|
||||
|
||||
|
||||
/*
|
||||
** tuiDefaultWinViewportHeight().
|
||||
** Answer the height of a window. If it hasn't been created yet,
|
||||
** answer what the height of a window would be based upon its
|
||||
** type and the layout.
|
||||
*/
|
||||
/* Answer the height of a window. If it hasn't been created yet,
|
||||
answer what the height of a window would be based upon its type and
|
||||
the layout. */
|
||||
int
|
||||
tuiDefaultWinViewportHeight (TuiWinType type, TuiLayoutType layout)
|
||||
tui_default_win_viewport_height (enum tui_win_type type,
|
||||
enum tui_layout_type layout)
|
||||
{
|
||||
int h;
|
||||
|
||||
@ -430,7 +422,7 @@ Source/Disassembly/Command layouts.\n");
|
||||
** $REGS, $GREGS, $FREGS, $SREGS.
|
||||
*/
|
||||
TuiStatus
|
||||
tui_set_layout (const char *layoutName)
|
||||
tui_set_layout_for_display_command (const char *layoutName)
|
||||
{
|
||||
TuiStatus status = TUI_SUCCESS;
|
||||
|
||||
@ -522,7 +514,7 @@ tui_set_layout (const char *layoutName)
|
||||
status = TUI_FAILURE;
|
||||
xfree (bufPtr);
|
||||
|
||||
tuiSetLayout (newLayout, dpyType);
|
||||
tui_set_layout (newLayout, dpyType);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -568,15 +560,15 @@ _tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
|
||||
{
|
||||
if (layoutDef->split)
|
||||
{
|
||||
tuiSetLayout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
|
||||
tui_set_layout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
|
||||
tuiSetWinFocusTo (winList[layoutDef->displayMode]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (layoutDef->displayMode == SRC_WIN)
|
||||
tuiSetLayout (SRC_COMMAND, TUI_UNDEFINED_REGS);
|
||||
tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
|
||||
else
|
||||
tuiSetLayout (DISASSEM_DATA_COMMAND, layoutDef->regsDisplayType);
|
||||
tui_set_layout (DISASSEM_DATA_COMMAND, layoutDef->regsDisplayType);
|
||||
}
|
||||
|
||||
|
||||
@ -622,7 +614,7 @@ _tuiLayout_command (char *arg, int fromTTY)
|
||||
tui_enable ();
|
||||
|
||||
/* Switch to the selected layout. */
|
||||
if (tui_set_layout (arg) != TUI_SUCCESS)
|
||||
if (tui_set_layout_for_display_command (arg) != TUI_SUCCESS)
|
||||
warning ("Invalid layout specified.\n%s", LAYOUT_USAGE);
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
/* TUI layout window management.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Hewlett-Packard Company.
|
||||
|
||||
This file is part of GDB.
|
||||
@ -22,9 +25,14 @@
|
||||
#ifndef TUI_LAYOUT_H
|
||||
#define TUI_LAYOUT_H
|
||||
|
||||
extern void tuiAddWinToLayout (TuiWinType);
|
||||
extern int tuiDefaultWinHeight (TuiWinType, TuiLayoutType);
|
||||
extern int tuiDefaultWinViewportHeight (TuiWinType, TuiLayoutType);
|
||||
extern TuiStatus tuiSetLayout (TuiLayoutType, TuiRegisterDisplayType);
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
|
||||
extern void tui_add_win_to_layout (enum tui_win_type);
|
||||
extern int tui_default_win_height (enum tui_win_type, enum tui_layout_type);
|
||||
extern int tui_default_win_viewport_height (enum tui_win_type,
|
||||
enum tui_layout_type);
|
||||
extern enum tui_status tui_set_layout (enum tui_layout_type,
|
||||
enum tui_register_display_type);
|
||||
|
||||
#endif /*TUI_LAYOUT_H */
|
||||
|
@ -170,7 +170,7 @@ tui_rl_change_windows (int notused1, int notused2)
|
||||
new_layout = SRC_COMMAND;
|
||||
break;
|
||||
}
|
||||
tuiSetLayout (new_layout, regs_type);
|
||||
tui_set_layout (new_layout, regs_type);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -205,7 +205,7 @@ tui_rl_delete_other_windows (int notused1, int notused2)
|
||||
new_layout = DISASSEM_COMMAND;
|
||||
break;
|
||||
}
|
||||
tuiSetLayout (new_layout, regs_type);
|
||||
tui_set_layout (new_layout, regs_type);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -389,7 +389,7 @@ tui_enable (void)
|
||||
def_prog_mode ();
|
||||
|
||||
tuiShowFrameInfo (0);
|
||||
tuiSetLayout (SRC_COMMAND, TUI_UNDEFINED_REGS);
|
||||
tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
|
||||
tuiSetWinFocusTo (srcWin);
|
||||
keypad (cmdWin->generic.handle, TRUE);
|
||||
wrefresh (cmdWin->generic.handle);
|
||||
@ -563,7 +563,7 @@ tui_show_source (const char *file, int line)
|
||||
{
|
||||
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
||||
/* make sure that the source window is displayed */
|
||||
tuiAddWinToLayout (SRC_WIN);
|
||||
tui_add_win_to_layout (SRC_WIN);
|
||||
|
||||
tuiUpdateSourceWindowsWithLine (cursal.symtab, line);
|
||||
tuiUpdateLocatorFilename (file);
|
||||
@ -572,7 +572,7 @@ tui_show_source (const char *file, int line)
|
||||
void
|
||||
tui_show_assembly (CORE_ADDR addr)
|
||||
{
|
||||
tuiAddWinToLayout (DISASSEM_WIN);
|
||||
tui_add_win_to_layout (DISASSEM_WIN);
|
||||
tuiUpdateSourceWindowsWithAddr (addr);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ extern void strcat_to_buf (char *, int, const char *);
|
||||
TuiStatus, *TuiStatusPtr;
|
||||
|
||||
/* Types of windows */
|
||||
typedef enum
|
||||
typedef enum tui_win_type
|
||||
{
|
||||
SRC_WIN = 0,
|
||||
DISASSEM_WIN,
|
||||
@ -138,7 +138,7 @@ extern void tui_show_source (const char *file, int line);
|
||||
extern struct ui_out *tui_out_new (struct ui_file *stream);
|
||||
|
||||
/* tuiLayout.c */
|
||||
extern TuiStatus tui_set_layout (const char *);
|
||||
extern enum tui_status tui_set_layout_for_display_command (const char *name);
|
||||
|
||||
/* tuiSourceWin.c */
|
||||
extern void tuiUpdateAllExecInfos (void);
|
||||
|
Reference in New Issue
Block a user