From: Stephane Carrez Date: Sat, 21 Jul 2001 22:31:14 +0000 (+0000) Subject: * utils.c (init_page_info): Use tui_get_command_dimension. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ecb18062a4db32339e1e2288686cc3ecdb5c428;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc7d05f4524..c6bf47f4c17 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-07-21 Stephane Carrez + + * 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 * i386bsd-nat.c: Do not include . diff --git a/gdb/printcmd.c b/gdb/printcmd.c index b0d8d721573..ec77715ca40 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 c66167b500d..82d010beb79 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