aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
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
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')
-rw-r--r--gdb/tui/ChangeLog12
-rw-r--r--gdb/tui/tuiLayout.c17
-rw-r--r--gdb/tui/tuiSourceWin.c11
-rw-r--r--gdb/tui/tuiWin.c11
4 files changed, 42 insertions, 9 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index 3016396..bfa8370 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,5 +1,17 @@
2001-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * 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.
+
+2001-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
* tuiWin.c (_tuiSetFocus): Replace subsetCompare with subset_compare.
* tuiLayout.c (_tuiSetLayoutTo): Likewise.
* tui.c (_tui_vToggle_command): Likewise.
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;
diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c
index 60c55a6..4bfc04e 100644
--- a/gdb/tui/tuiSourceWin.c
+++ b/gdb/tui/tuiSourceWin.c
@@ -241,16 +241,22 @@ tui_vUpdateSourceWindowsWithAddr (va_list args)
void
tuiUpdateSourceWindowsWithLine (struct symtab *s, int line)
{
+ CORE_ADDR pc;
+
switch (currentLayout ())
{
case DISASSEM_COMMAND:
case DISASSEM_DATA_COMMAND:
- tuiUpdateSourceWindowsWithAddr ((Opaque) find_line_pc (s, line));
+ find_line_pc (s, line, &pc);
+ tuiUpdateSourceWindowsWithAddr ((Opaque) pc);
break;
default:
tuiShowSource (s, (Opaque) line, FALSE);
if (currentLayout () == SRC_DISASSEM_COMMAND)
- tuiShowDisassem ((Opaque) find_line_pc (s, line));
+ {
+ find_line_pc (s, line, &pc);
+ tuiShowDisassem ((Opaque) pc);
+ }
break;
}
@@ -514,6 +520,7 @@ tuiSetHasBreakAt (struct breakpoint *bp, TuiWinInfoPtr winInfo, int hasBreak)
fileNameDisplayed = current_source_symtab->filename;
gotIt = (fileNameDisplayed != (char *) NULL &&
+ bp->source_file != NULL &&
(strcmp (bp->source_file, fileNameDisplayed) == 0) &&
content[i]->whichElement.source.lineOrAddr.lineNo ==
bp->line_number);
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 3843eb6..4c3acd2 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -25,6 +25,7 @@
Author: Susan B. Macchia */
#include <string.h>
+#include <ctype.h>
#include "defs.h"
#include "command.h"
#include "symtab.h"
@@ -35,6 +36,9 @@
#include "tuiData.h"
#include "tuiGeneralWin.h"
#include "tuiStack.h"
+#include "tuiRegs.h"
+#include "tuiDisassem.h"
+#include "tuiSource.h"
#include "tuiSourceWin.h"
#include "tuiDataWin.h"
@@ -1221,7 +1225,12 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
if (winInfo->generic.type == SRC_WIN)
line = (Opaque) current_source_line;
else
- line = (Opaque) find_line_pc (s, current_source_line);
+ {
+ CORE_ADDR pc;
+
+ find_line_pc (s, current_source_line, &pc);
+ line = (Opaque) pc;
+ }
tuiUpdateSourceWindow (winInfo, s, line, TRUE);
}
if (m_hasLocator (winInfo))