(_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.
2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * 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.
+
+2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
* tuiSourceWin.h: Remove unused declarations.
* tuiSourceWin.c (tui_vUpdateSourceWindowsWithAddr): Remove.
(tui_vUpdateSourceWindowsWithLine): Remove.
#include "defs.h"
#include "tui.h"
#include "tuiData.h"
+#include "tuiGeneralWin.h"
/****************************
** GLOBAL DECLARATIONS
{
case SRC_WIN:
case DISASSEM_WIN:
- winInfo->detail.sourceInfo.startLineOrAddr.addr = (Opaque) NULL;
+ winInfo->detail.sourceInfo.startLineOrAddr.addr = 0;
winInfo->detail.sourceInfo.horizontalOffset = 0;
break;
case CMD_WIN:
type = curWin->generic.type + 1;
while (type != curWin->generic.type && m_winPtrIsNull (nextWin))
{
- if (winList[type]->generic.isVisible)
+ if (winList[type] && winList[type]->generic.isVisible)
nextWin = winList[type];
else
{
else
strcpy (lineNo, "??");
if (elementPtr != (TuiWinElementPtr) NULL &&
- elementPtr->whichElement.locator.addr > (Opaque) 0)
- sprintf (pc, "0x%x",
- elementPtr->whichElement.locator.addr);
+ elementPtr->whichElement.locator.addr != 0)
+ sprintf (pc, "0x%lx",
+ (long) elementPtr->whichElement.locator.addr);
else
strcpy (pc, "??");
/*
while (i < MAX_MAJOR_WINDOWS && m_winPtrIsNull (winInfo))
{
- char *curName = winName (&winList[i]->generic);
- if (strlen (name) <= strlen (curName) &&
- strncmp (name, curName, strlen (name)) == 0)
- winInfo = winList[i];
+ if (winList[i] != 0)
+ {
+ char *curName = winName (&winList[i]->generic);
+ if (strlen (name) <= strlen (curName) &&
+ strncmp (name, curName, strlen (name)) == 0)
+ winInfo = winList[i];
+ }
i++;
}
}
winInfo->detail.sourceInfo.executionInfo = (TuiGenWinInfoPtr) NULL;
winInfo->detail.sourceInfo.hasLocator = FALSE;
winInfo->detail.sourceInfo.horizontalOffset = 0;
- winInfo->detail.sourceInfo.startLineOrAddr.addr = (Opaque) NULL;
+ winInfo->detail.sourceInfo.startLineOrAddr.addr = 0;
break;
case DATA_WIN:
winInfo->detail.dataDisplayInfo.dataContent = (TuiWinContent) NULL;
&(tui_file_get_strbuf (gdb_dis_out)[offset]));
else
element->whichElement.source.line[0] = '\0';
- element->whichElement.source.lineOrAddr.addr = (Opaque) pc;
+ element->whichElement.source.lineOrAddr.addr = pc;
element->whichElement.source.isExecPoint =
(pc == (CORE_ADDR) ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr);
bp = _hasBreak (pc);
{
struct symtab *s = find_pc_symtab (startAddr);
TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
+ TuiLineOrAddress val;
+ val.addr = startAddr;
tuiAddWinToLayout (DISASSEM_WIN);
- tuiUpdateSourceWindow (disassemWin, s, startAddr, FALSE);
+ tuiUpdateSourceWindow (disassemWin, s, val, FALSE);
/*
** if the focus was in the src win, put it in the asm win, if the
** source view isn't split
tuiShowDisassem (startAddr);
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
+ TuiLineOrAddress val;
TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
/*
** Update what is in the source window if it is displayed too,
** note that it follows what is in the disassembly window and visa-versa
*/
sal = find_pc_line (startAddr, 0);
- tuiUpdateSourceWindow (srcWin, sal.symtab, sal.line, TRUE);
+ val.lineNo = sal.line;
+ tuiUpdateSourceWindow (srcWin, sal.symtab, val, TRUE);
if (sal.symtab)
{
current_source_symtab = sal.symtab;
return;
} /* tuiShowDisassemAndUpdateSource */
-
-/*
- ** tuiShowDisassemAsIs().
- ** Function to display the disassembly window. This function shows
- ** the disassembly as specified by the horizontal offset.
- */
-void
-tuiShowDisassemAsIs (Opaque addr)
-{
- tuiAddWinToLayout (DISASSEM_WIN);
- tuiUpdateSourceWindowAsIs (disassemWin, (struct symtab *) NULL, addr, FALSE);
- /*
- ** Update what is in the source window if it is displayed too, not that it
- ** follows what is in the disassembly window and visa-versa
- */
- if (currentLayout () == SRC_DISASSEM_COMMAND)
- tuiShowSourceContent (srcWin); /*???? Need to do more? */
-
- return;
-} /* tuiShowDisassem */
-
-
/*
** tuiGetBeginAsmAddress().
*/
register int line = 0;
register CORE_ADDR newLow;
bfd_byte buffer[4];
+ TuiLineOrAddress val;
newLow = pc;
if (scrollDirection == FORWARD_SCROLL)
}
else
{
- for (; newLow >= (Opaque) 0 && line < numToScroll; line++)
+ for (; newLow != 0 && line < numToScroll; line++)
newLow -= sizeof (bfd_getb32 (buffer));
}
- tuiUpdateSourceWindowAsIs (disassemWin, s, newLow, FALSE);
+ val.addr = newLow;
+ tuiUpdateSourceWindowAsIs (disassemWin, s, val, FALSE);
}
}
******************************************/
extern TuiStatus tuiSetDisassemContent (struct symtab *, CORE_ADDR);
extern void tuiShowDisassem (CORE_ADDR);
-extern void tuiShowDisassemAndUpdateSource (Opaque);
+extern void tuiShowDisassemAndUpdateSource (CORE_ADDR);
extern void tuiVerticalDisassemScroll (TuiScrollDirection, int);
extern CORE_ADDR tuiGetBeginAsmAddress (void);
#include "frame.h"
#include "breakpoint.h"
#include "source.h"
+#include "symtab.h"
#include "tui.h"
#include "tuiData.h"
** initializes the horizontal scroll to 0.
*/
void
-tuiShowSource (struct symtab *s, Opaque line, int noerror)
+tuiShowSource (struct symtab *s, TuiLineOrAddress line, int noerror)
{
srcWin->detail.sourceInfo.horizontalOffset = 0;
- m_tuiShowSourceAsIs (s, line, noerror);
+ tuiUpdateSourceWindowAsIs(srcWin, s, line, noerror);
return;
} /* tuiShowSource */
** Scroll the source forward or backward vertically
*/
void
-tuiVerticalSourceScroll (TuiScrollDirection scrollDirection, int numToScroll)
+tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
+ int numToScroll)
{
if (srcWin->generic.content != (OpaquePtr) NULL)
{
- int line;
- Opaque addr;
+ TuiLineOrAddress l;
struct symtab *s;
TuiWinContent content = (TuiWinContent) srcWin->generic.content;
if (scrollDirection == FORWARD_SCROLL)
{
- line = content[0]->whichElement.source.lineOrAddr.lineNo +
+ l.lineNo = content[0]->whichElement.source.lineOrAddr.lineNo +
numToScroll;
- if (line > s->nlines)
+ if (l.lineNo > s->nlines)
/*line = s->nlines - winInfo->generic.contentSize + 1; */
/*elz: fix for dts 23398 */
- line = content[0]->whichElement.source.lineOrAddr.lineNo;
+ l.lineNo = content[0]->whichElement.source.lineOrAddr.lineNo;
}
else
{
- line = content[0]->whichElement.source.lineOrAddr.lineNo -
+ l.lineNo = content[0]->whichElement.source.lineOrAddr.lineNo -
numToScroll;
- if (line <= 0)
- line = 1;
+ if (l.lineNo <= 0)
+ l.lineNo = 1;
}
- tuiUpdateSourceWindowAsIs (srcWin, s, (Opaque) line, FALSE);
+ if (identify_source_line (s, l.lineNo, 0, -1) == 1)
+ tuiUpdateSourceWindowAsIs (srcWin, s, l, FALSE);
}
return;
#define _TUI_SOURCE_H
#include "defs.h"
-#if 0
-#include "symtab.h"
-#include "breakpoint.h"
-#endif
extern TuiStatus tuiSetSourceContent (struct symtab *, int, int);
-extern void tuiShowSource (struct symtab *, Opaque, int);
+extern void tuiShowSource (struct symtab *, TuiLineOrAddress, int);
extern void tuiShowSourceAsIs (struct symtab *, Opaque, int);
extern int tuiSourceIsDisplayed (char *);
extern void tuiVerticalSourceScroll (TuiScrollDirection, int);
*/
void
tuiUpdateSourceWindow (TuiWinInfoPtr winInfo, struct symtab *s,
- Opaque lineOrAddr, int noerror)
+ TuiLineOrAddress lineOrAddr, int noerror)
{
winInfo->detail.sourceInfo.horizontalOffset = 0;
tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror);
*/
void
tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
- Opaque lineOrAddr, int noerror)
+ TuiLineOrAddress lineOrAddr, int noerror)
{
TuiStatus ret;
if (winInfo->generic.type == SRC_WIN)
- ret = tuiSetSourceContent (s, (int) lineOrAddr, noerror);
+ ret = tuiSetSourceContent (s, lineOrAddr.lineNo, noerror);
else
- ret = tuiSetDisassemContent (s, (Opaque) lineOrAddr);
+ ret = tuiSetDisassemContent (s, lineOrAddr.addr);
if (ret == TUI_FAILURE)
{
tuiUpdateExecInfo (winInfo);
if (winInfo->generic.type == SRC_WIN)
{
- current_source_line = (int) lineOrAddr +
+ current_source_line = lineOrAddr.lineNo +
(winInfo->generic.contentSize - 2);
current_source_symtab = s;
/*
if (addr != 0)
{
struct symtab_and_line sal;
-
+ TuiLineOrAddress l;
+
switch (currentLayout ())
{
case DISASSEM_COMMAND:
break;
default:
sal = find_pc_line (addr, 0);
- tuiShowSource (sal.symtab, sal.line, FALSE);
+ l.lineNo = sal.line;
+ tuiShowSource (sal.symtab, l, FALSE);
break;
}
}
tuiUpdateSourceWindowsWithLine (struct symtab *s, int line)
{
CORE_ADDR pc;
-
+ TuiLineOrAddress l;
+
switch (currentLayout ())
{
case DISASSEM_COMMAND:
tuiUpdateSourceWindowsWithAddr (pc);
break;
default:
- tuiShowSource (s, line, FALSE);
+ l.lineNo = line;
+ tuiShowSource (s, l, FALSE);
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);
tuiUpdateSourceWindowAsIs (
winInfo,
s,
- ((winInfo == srcWin) ?
- (Opaque) ((TuiWinElementPtr)
- winInfo->generic.content[0])->whichElement.source.lineOrAddr.lineNo :
- (Opaque) ((TuiWinElementPtr)
- winInfo->generic.content[0])->whichElement.source.lineOrAddr.addr),
- (int) FALSE);
+ ((TuiWinElementPtr)
+ winInfo->generic.content[0])->whichElement.source.lineOrAddr,
+ FALSE);
}
return;
** Set or clear the hasBreak flag in the line whose line is lineNo.
*/
void
-tuiSetIsExecPointAt (Opaque lineOrAddr, TuiWinInfoPtr winInfo)
+tuiSetIsExecPointAt (TuiLineOrAddress l, TuiWinInfoPtr winInfo)
{
int i;
TuiWinContent content = (TuiWinContent) winInfo->generic.content;
i = 0;
while (i < winInfo->generic.contentSize)
{
- if (content[i]->whichElement.source.lineOrAddr.addr == lineOrAddr)
+ if (content[i]->whichElement.source.lineOrAddr.addr == l.addr)
content[i]->whichElement.source.isExecPoint = TRUE;
else
content[i]->whichElement.source.isExecPoint = FALSE;
return;
} /* tuiSetIsExecPointAt */
-
/*
** tuiSetHasBreakAt().
** Set or clear the hasBreak flag in the line whose line is lineNo.
/* for all the windows (src, asm) */
for (i = 0; i < (sourceWindows ())->count; i++)
{
+ TuiLineOrAddress l;
+
winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
- tuiSetIsExecPointAt ((Opaque) - 1, winInfo); /* the target is'n running */
+ l.addr = -1;
+ l.lineNo = -1;
+ tuiSetIsExecPointAt (l, winInfo); /* the target is'n running */
/* -1 should not match any line number or pc */
tuiSetExecInfoContent (winInfo); /*set winInfo so that > is'n displayed */
tuiShowExecInfoContent (winInfo); /* display the new contents */
filename,
(char *) NULL,
0,
- (Opaque) NULL,
+ (CORE_ADDR) 0,
&((TuiWinElementPtr) locator->content[0])->whichElement.locator);
tuiShowLocatorContent ();
** in the current source window.
*/
int
-tuiLineIsDisplayed (Opaque lineNoOrAddr, TuiWinInfoPtr winInfo,
+tuiLineIsDisplayed (int line, TuiWinInfoPtr winInfo,
int checkThreshold)
{
int isDisplayed = FALSE;
i = 0;
while (i < winInfo->generic.contentSize - threshold && !isDisplayed)
{
- if (winInfo == srcWin)
- isDisplayed = (((TuiWinElementPtr)
- winInfo->generic.content[i])->whichElement.source.lineOrAddr.lineNo
- == (int) lineNoOrAddr);
- else
- isDisplayed = (((TuiWinElementPtr)
- winInfo->generic.content[i])->whichElement.source.lineOrAddr.addr
- == lineNoOrAddr);
+ isDisplayed = (((TuiWinElementPtr)
+ winInfo->generic.content[i])->whichElement.source.lineOrAddr.lineNo
+ == (int) line);
i++;
}
} /* tuiLineIsDisplayed */
+/*
+ ** tuiLineIsDisplayed().
+ ** Answer whether the a particular line number or address is displayed
+ ** in the current source window.
+ */
+int
+tuiAddrIsDisplayed (CORE_ADDR addr, TuiWinInfoPtr winInfo,
+ int checkThreshold)
+{
+ int isDisplayed = FALSE;
+ int i, threshold;
+
+ if (checkThreshold)
+ threshold = SCROLL_THRESHOLD;
+ else
+ threshold = 0;
+ i = 0;
+ while (i < winInfo->generic.contentSize - threshold && !isDisplayed)
+ {
+ isDisplayed = (((TuiWinElementPtr)
+ winInfo->generic.content[i])->whichElement.source.lineOrAddr.addr
+ == addr);
+ i++;
+ }
+
+ return isDisplayed;
+}
+
+
/*****************************************
** STATIC LOCAL FUNCTIONS **
******************************************/
#define _TUI_SOURCEWIN_H
extern void tuiDisplayMainFunction (void);
-extern void tuiUpdateSourceWindow (TuiWinInfoPtr, struct symtab *, Opaque,
+extern void tuiUpdateSourceWindow (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,
int);
-extern void tuiUpdateSourceWindowAsIs (TuiWinInfoPtr, struct symtab *, Opaque,
+extern void tuiUpdateSourceWindowAsIs (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,
int);
extern void tuiUpdateSourceWindowsWithAddr (CORE_ADDR);
extern void tuiUpdateSourceWindowsWithLine (struct symtab *, int);
extern void tuiUpdateExecInfo (TuiWinInfoPtr);
extern void tuiUpdateAllExecInfos (void);
-extern void tuiSetIsExecPointAt (Opaque, TuiWinInfoPtr);
+extern void tuiSetIsExecPointAt (TuiLineOrAddress, TuiWinInfoPtr);
extern void tuiSetHasBreakAt (struct breakpoint *, TuiWinInfoPtr, int);
extern void tuiAllSetHasBreakAt (struct breakpoint *, int);
extern TuiStatus tuiAllocSourceBuffer (TuiWinInfoPtr);
-extern int tuiLineIsDisplayed (Opaque, TuiWinInfoPtr, int);
+extern int tuiLineIsDisplayed (int, TuiWinInfoPtr, int);
+extern int tuiAddrIsDisplayed (CORE_ADDR, TuiWinInfoPtr, int);
/*
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.
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;
}
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);
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.
extern void tuiSetLocatorInfo (char *, char *, int, CORE_ADDR,
TuiLocatorElementPtr);
extern void tuiUpdateLocatorFilename (char *);
-extern void tui_vUpdateLocatorFilename (va_list);
extern void tuiUpdateLocatorInfoFromFrame
(struct frame_info *, TuiLocatorElementPtr);
extern void tuiUpdateLocatorDisplay (struct frame_info *);
extern void tuiClearLocatorContent (void);
extern void tuiSwitchFilename (char *);
extern void tuiShowFrameInfo (struct frame_info *);
-extern void tui_vShowFrameInfo (va_list);
extern void tuiGetLocatorFilename (TuiGenWinInfoPtr, char **);
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);
}
if (*bufPtr != (char) 0)
wname = bufPtr;
-
+ else
+ wname = "?";
+
/* Validate the window name */
for (i = 0; i < strlen (wname); i++)
wname[i] = toupper (wname[i]);