aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiLayout.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-17 22:22:40 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-17 22:22:40 +0000
commit84b1e7c7ee7e32bf88270c46f0ee1cbf002a09c3 (patch)
tree2dc9a434f39f10d741876f20a2253d2301f098ed /gdb/tui/tuiLayout.c
parent7e5a932280d5d0cd731a09e195c9e7a25c1677d4 (diff)
downloadgdb-84b1e7c7ee7e32bf88270c46f0ee1cbf002a09c3.zip
gdb-84b1e7c7ee7e32bf88270c46f0ee1cbf002a09c3.tar.gz
gdb-84b1e7c7ee7e32bf88270c46f0ee1cbf002a09c3.tar.bz2
* tuiWin.c: Add missing includes.
(_makeVisibleWithNewHeight): Fix call to find_line_pc. * tuiLayout.c: Add missing includes. (_initAndMakeWin): Don't put curses in echo mode. (_extractDisplayStartAddr): Fix calls to find_line_pc. (_tuiLayout_command): Missing ',' in warning call. * tuiSourceWin.c (tuiUpdateSourceWindowsWithLine): Fix calls to find_line_pc. (tuiSetHasBreakAt): Check for null source file.
Diffstat (limited to 'gdb/tui/tuiLayout.c')
-rw-r--r--gdb/tui/tuiLayout.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c
index 9d30bde..5db7f08 100644
--- a/gdb/tui/tuiLayout.c
+++ b/gdb/tui/tuiLayout.c
@@ -23,12 +23,16 @@
#include "command.h"
#include "symtab.h"
#include "frame.h"
+#include <ctype.h>
#include "tui.h"
#include "tuiData.h"
+#include "tuiDataWin.h"
#include "tuiGeneralWin.h"
#include "tuiStack.h"
#include "tuiRegs.h"
+#include "tuiWin.h"
+#include "tuiSourceWin.h"
#include "tuiDisassem.h"
/*******************************
@@ -539,7 +543,7 @@ _tuiSetLayoutTo (char *layoutName)
dpyType = TUI_GENERAL_REGS;
else if (subset_compare (bufPtr, TUI_SPECIAL_REGS_NAME))
dpyType = TUI_SPECIAL_REGS;
- else
+ else if (dataWin)
{
if (dataWin->detail.dataDisplayInfo.regsDisplayType !=
TUI_UNDEFINED_REGS)
@@ -582,14 +586,16 @@ _extractDisplayStartAddr (void)
{
TuiLayoutType curLayout = currentLayout ();
Opaque addr;
+ CORE_ADDR pc;
switch (curLayout)
{
case SRC_COMMAND:
case SRC_DATA_COMMAND:
- addr = (Opaque) find_line_pc (
- current_source_symtab,
- srcWin->detail.sourceInfo.startLineOrAddr.lineNo);
+ find_line_pc (current_source_symtab,
+ srcWin->detail.sourceInfo.startLineOrAddr.lineNo,
+ &pc);
+ addr =(Opaque) pc;
break;
case DISASSEM_COMMAND:
case SRC_DISASSEM_COMMAND:
@@ -672,7 +678,7 @@ _tuiLayout_command (char *arg, int fromTTY)
{
if ((TuiStatus) tuiDo (
(TuiOpaqueFuncPtr) tui_vSetLayoutTo, arg) != TUI_SUCCESS)
- warning ("Invalid layout specified.\n%s" LAYOUT_USAGE);
+ warning ("Invalid layout specified.\n%s", LAYOUT_USAGE);
return;
} /* _tuiLayout_command */
@@ -1061,7 +1067,6 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType,
makeWindow (generic, boxIt);
if (winType == LOCATOR_WIN)
tuiClearLocatorDisplay ();
- echo ();
}
*winInfoPtr = opaqueWinInfo;