aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiDisassem.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/tuiDisassem.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/tuiDisassem.c')
-rw-r--r--gdb/tui/tuiDisassem.c38
1 files changed, 11 insertions, 27 deletions
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c
index 4d3b61a..7bdcbf7 100644
--- a/gdb/tui/tuiDisassem.c
+++ b/gdb/tui/tuiDisassem.c
@@ -113,7 +113,7 @@ extern void strcat_address_numeric (CORE_ADDR, int, char *, int);
&(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);
@@ -146,9 +146,11 @@ tuiShowDisassem (CORE_ADDR startAddr)
{
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
@@ -172,13 +174,15 @@ tuiShowDisassemAndUpdateSource (CORE_ADDR startAddr)
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;
@@ -191,28 +195,6 @@ tuiShowDisassemAndUpdateSource (CORE_ADDR startAddr)
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().
*/
@@ -272,6 +254,7 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
register int line = 0;
register CORE_ADDR newLow;
bfd_byte buffer[4];
+ TuiLineOrAddress val;
newLow = pc;
if (scrollDirection == FORWARD_SCROLL)
@@ -281,10 +264,11 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
}
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);
}
}