aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiWin.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/tuiWin.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/tuiWin.c')
-rw-r--r--gdb/tui/tuiWin.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index a0b9bb5..07555e5 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -1139,26 +1139,19 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
winInfo->detail.sourceInfo.startLineOrAddr.addr;
freeWinContent (&winInfo->generic);
tuiUpdateSourceWindow (winInfo,
- current_source_symtab,
- ((winInfo->generic.type == SRC_WIN) ?
- (Opaque) lineOrAddr.lineNo :
- lineOrAddr.addr),
- TRUE);
+ current_source_symtab, lineOrAddr, TRUE);
}
else if (selected_frame != (struct frame_info *) NULL)
{
- Opaque line = 0;
+ TuiLineOrAddress line;
extern int current_source_line;
s = find_pc_symtab (selected_frame->pc);
if (winInfo->generic.type == SRC_WIN)
- line = (Opaque) current_source_line;
+ line.lineNo = current_source_line;
else
{
- CORE_ADDR pc;
-
- find_line_pc (s, current_source_line, &pc);
- line = (Opaque) pc;
+ find_line_pc (s, current_source_line, &line.addr);
}
tuiUpdateSourceWindow (winInfo, s, line, TRUE);
}
@@ -1349,7 +1342,9 @@ _parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll)
if (*bufPtr != (char) 0)
wname = bufPtr;
-
+ else
+ wname = "?";
+
/* Validate the window name */
for (i = 0; i < strlen (wname); i++)
wname[i] = toupper (wname[i]);