aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/printcmd.c17
-rw-r--r--gdb/utils.c7
3 files changed, 12 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cc7d05f..c6bf47f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * utils.c (init_page_info): Use tui_get_command_dimension.
+ * printcmd.c (disassemble_command): Simplify tui specific code,
+ use tui_is_window_visible, tui_show_assembly.
+
2001-07-21 Mark Kettenis <kettenis@gnu.org>
* i386bsd-nat.c: Do not include <sys/sysctl.h>.
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index b0d8d72..ec77715 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1396,8 +1396,7 @@ display_command (char *exp, int from_tty)
#if defined(TUI)
if (tui_version && *exp == '$')
- display_it = ((TuiStatus) tuiDo (
- (TuiOpaqueFuncPtr) tui_vSetLayoutTo, exp) == TUI_FAILURE);
+ display_it = (tui_set_layout (exp) == TUI_FAILURE);
#endif
if (display_it)
@@ -2335,9 +2334,7 @@ disassemble_command (char *arg, int from_tty)
error ("No function contains program counter for selected frame.\n");
#if defined(TUI)
else if (tui_version)
- low = (CORE_ADDR) tuiDo ((TuiOpaqueFuncPtr) tui_vGetLowDisassemblyAddress,
- (Opaque) low,
- (Opaque) pc);
+ low = tuiGetLowDisassemblyAddress (low, pc);
#endif
low += FUNCTION_START_OFFSET;
}
@@ -2349,9 +2346,7 @@ disassemble_command (char *arg, int from_tty)
error ("No function contains specified address.\n");
#if defined(TUI)
else if (tui_version)
- low = (CORE_ADDR) tuiDo ((TuiOpaqueFuncPtr) tui_vGetLowDisassemblyAddress,
- (Opaque) low,
- (Opaque) pc);
+ low = tuiGetLowDisassemblyAddress (low, pc);
#endif
#if 0
if (overlay_debugging)
@@ -2378,8 +2373,7 @@ disassemble_command (char *arg, int from_tty)
}
#if defined(TUI)
- if (!tui_version ||
- m_winPtrIsNull (disassemWin) || !disassemWin->generic.isVisible)
+ if (!tui_is_window_visible (DISASSEM_WIN))
#endif
{
printf_filtered ("Dump of assembler code ");
@@ -2427,8 +2421,7 @@ disassemble_command (char *arg, int from_tty)
#if defined(TUI)
else
{
- tuiDo ((TuiOpaqueFuncPtr) tui_vAddWinToLayout, DISASSEM_WIN);
- tuiDo ((TuiOpaqueFuncPtr) tui_vUpdateSourceWindowsWithAddr, low);
+ tui_show_assembly (low);
}
#endif
}
diff --git a/gdb/utils.c b/gdb/utils.c
index c66167b..82d010b 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1500,12 +1500,7 @@ void
init_page_info (void)
{
#if defined(TUI)
- if (tui_version && m_winPtrNotNull (cmdWin))
- {
- lines_per_page = cmdWin->generic.height;
- chars_per_line = cmdWin->generic.width;
- }
- else
+ if (!tui_get_command_dimension (&chars_per_line, &lines_per_page))
#endif
{
/* These defaults will be used if we are unable to get the correct