aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiStack.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-20 23:06:48 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-20 23:06:48 +0000
commita4b99e53449d48e54a827a7bd4af282caaed0150 (patch)
treec8a98789c28683a48872862fc923552a27aff423 /gdb/tui/tuiStack.c
parent19eb139b7243abc4b725c1836ac3810b274e2637 (diff)
downloadgdb-a4b99e53449d48e54a827a7bd4af282caaed0150.zip
gdb-a4b99e53449d48e54a827a7bd4af282caaed0150.tar.gz
gdb-a4b99e53449d48e54a827a7bd4af282caaed0150.tar.bz2
* tuiWin.c (_parseScrollingArgs): Fix uninitialized variable.
(_makeVisibleWithNewHeight): Use TuiLineOrAddress type. * tuiStack.c (tuiShowFrameInfo): Use TuiLineOrAddress type. (tui_vUpdateLocatorFilename): Remove. * tuiStack.h: Update prototypes. * tuiSourceWin.c (tuiAddrIsDisplayed): New function. (tuiLineIsDisplayed): Split for address and line. (tuiUpdateSourceWindow): Use TuiLineOrAddress type. (tuiUpdateSourceWindowAsIs): Likewise. (tuiUpdateSourceWindowsWithAddr): Likewise. (tuiUpdateSourceWindowsWithLine): Likewise. (tuiHorizontalSourceScroll): Likewise. (tuiSetIsExecPointAt): Likewise. (tuiUpdateOnEnd): Likewise. * tuiSourceWin.h: Update prototypes. * tuiSource.c (tuiVerticalSourceScroll): Use TuiLineOrAddress type. (tuiShowSource): Likewise. (tuiVerticalSourceScroll): Likewise. * tuiSource.h (tuiShowSource): Update prototype. * tuiDisassem.c (tuiSetDisassemContent): Use CORE_ADDR for address. (tuiShowDisassem): Use TuiLineOrAddress type. (tuiShowDisassemAndUpdateSource): Likewise. (tuiVerticalDisassemScroll): Likewise. (tuiShowDisassemAsIs): Remove. * tuiDisassem.h (tuiSetDisassemContent): Update prototype. * tuiData.c (initWinInfo): Use CORE_ADDR for address. (clearWinDetail): Likewise. (displayableWinContentOf): Fix address conversion. (tuiNextWin): Fix crash when the window is not yet created. (partialWinByName): Likewise.
Diffstat (limited to 'gdb/tui/tuiStack.c')
-rw-r--r--gdb/tui/tuiStack.c73
1 files changed, 23 insertions, 50 deletions
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index ce979dd..b3e4931 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -164,23 +164,6 @@ tuiUpdateLocatorFilename (char *fileName)
return;
} /* tuiUpdateLocatorFilename */
-
-/*
- ** tui_vUpdateLocatorFilename().
- ** Update only the filename portion of the locator with args in a va_list.
- */
-void
-tui_vUpdateLocatorFilename (va_list args)
-{
- char *fileName;
-
- fileName = va_arg (args, char *);
- tuiUpdateLocatorFilename (fileName);
-
- return;
-} /* tui_vUpdateLocatorFilename */
-
-
/*
** tuiSwitchFilename().
** Update the filename portion of the locator. Clear the other info in locator.
@@ -336,16 +319,19 @@ tuiShowFrameInfo (struct frame_info *fi)
if (s == 0)
return;
+ startLine = 0;
sourceAlreadyDisplayed = tuiSourceIsDisplayed (s->filename);
tuiUpdateLocatorDisplay (fi);
for (i = 0; i < (sourceWindows ())->count; i++)
{
+ TuiWhichElement *item;
winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
+
+ item = &((TuiWinElementPtr) locator->content[0])->whichElement;
if (winInfo == srcWin)
{
- startLine =
- (((TuiWinElementPtr) locator->content[0])->whichElement.locator.lineNo -
- (winInfo->generic.viewportHeight / 2)) + 1;
+ startLine = (item->locator.lineNo -
+ (winInfo->generic.viewportHeight / 2)) + 1;
if (startLine <= 0)
startLine = 1;
}
@@ -359,26 +345,30 @@ tuiShowFrameInfo (struct frame_info *fi)
if (winInfo == srcWin)
{
- if (!(sourceAlreadyDisplayed && m_tuiLineDisplayedWithinThreshold (
- winInfo,
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.lineNo)))
- tuiUpdateSourceWindow (winInfo, s, (Opaque) startLine, TRUE);
+ TuiLineOrAddress l;
+ l.lineNo = startLine;
+ if (!(sourceAlreadyDisplayed
+ && tuiLineIsDisplayed (item->locator.lineNo, winInfo, TRUE)))
+ tuiUpdateSourceWindow (winInfo, s, l, TRUE);
else
- tuiSetIsExecPointAt ((Opaque)
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.lineNo,
- winInfo);
+ {
+ l.lineNo = item->locator.lineNo;
+ tuiSetIsExecPointAt (l, winInfo);
+ }
}
else
{
if (winInfo == disassemWin)
{
- if (!m_tuiLineDisplayedWithinThreshold (winInfo,
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr))
- tuiUpdateSourceWindow (winInfo, s, (Opaque) low, TRUE);
+ TuiLineOrAddress a;
+ a.addr = low;
+ if (!tuiAddrIsDisplayed (item->locator.addr, winInfo, TRUE))
+ tuiUpdateSourceWindow (winInfo, s, a, TRUE);
else
- tuiSetIsExecPointAt ((Opaque)
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr,
- winInfo);
+ {
+ a.addr = item->locator.addr;
+ tuiSetIsExecPointAt (a, winInfo);
+ }
}
}
tuiUpdateExecInfo (winInfo);
@@ -398,23 +388,6 @@ tuiShowFrameInfo (struct frame_info *fi)
return;
} /* tuiShowFrameInfo */
-
-/*
- ** tui_vShowFrameInfo().
- ** Function to print the frame inforrmation for the TUI with args in a va_list.
- */
-void
-tui_vShowFrameInfo (va_list args)
-{
- struct frame_info *fi;
-
- fi = va_arg (args, struct frame_info *);
- tuiShowFrameInfo (fi);
-
- return;
-} /* tui_vShowFrameInfo */
-
-
/*
** _initialize_tuiStack().
** Function to initialize gdb commands, for tui window stack manipulation.