aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-21 22:24:44 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-21 22:24:44 +0000
commit1403b519de59bafc12b3a9e45cb074a48aabb97e (patch)
tree231f84209c829ce58df0259d6a642803a84066a1
parent3e266828dab2a9fe8334a10b70fd9d1b530b663b (diff)
downloadgdb-1403b519de59bafc12b3a9e45cb074a48aabb97e.zip
gdb-1403b519de59bafc12b3a9e45cb074a48aabb97e.tar.gz
gdb-1403b519de59bafc12b3a9e45cb074a48aabb97e.tar.bz2
* tui.h (tui_show_assembly): Declare.
(tui_is_window_visible): Declare. * tui.c (tui_show_assembly): New function. (tui_is_window_visible): New function. (tui_get_command_dimension): New function.
-rw-r--r--gdb/tui/ChangeLog8
-rw-r--r--gdb/tui/tui.c32
-rw-r--r--gdb/tui/tui.h3
3 files changed, 43 insertions, 0 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index f34da3d..f00e838 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,11 @@
+2001-07-22 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * tui.h (tui_show_assembly): Declare.
+ (tui_is_window_visible): Declare.
+ * tui.c (tui_show_assembly): New function.
+ (tui_is_window_visible): New function.
+ (tui_get_command_dimension): New function.
+
2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* tuiWin.c (tuiRefreshAll): Use clearok to force a refresh.
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 370afb4..6c1dea0 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -385,3 +385,35 @@ _tuiReset (void)
} /* _tuiReset */
#endif
+
+void
+tui_show_assembly (CORE_ADDR addr)
+{
+ tuiAddWinToLayout (DISASSEM_WIN);
+ tuiUpdateSourceWindowsWithAddr (addr);
+}
+
+int
+tui_is_window_visible (TuiWinType type)
+{
+ if (tui_version == 0)
+ return 0;
+
+ if (winList[type] == 0)
+ return 0;
+
+ return winList[type]->generic.isVisible;
+}
+
+int
+tui_get_command_dimension (int *width, int *height)
+{
+ if (!tui_version || !m_winPtrNotNull (cmdWin))
+ {
+ return 0;
+ }
+
+ *width = cmdWin->generic.width;
+ *height = cmdWin->generic.height;
+ return 1;
+}
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index afcbe8a..c26802b 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -92,6 +92,9 @@ TuiPoint, *TuiPointPtr;
/* tui.c */
extern void tuiFree (char *);
extern CORE_ADDR tuiGetLowDisassemblyAddress (CORE_ADDR, CORE_ADDR);
+extern void tui_show_assembly (CORE_ADDR addr);
+extern int tui_is_window_visible (TuiWinType type);
+extern int tui_get_command_dimension (int *width, int *height);
/* Initialize readline and configure the keymap for the switching
key shortcut. */