(TuiLineOrAddress): Likewise.
* tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
an address.
(tuiSetDisassemContent): Likewise.
(tuiShowDisassem, tuiShowDisassemAndUpdateSource): Likewise.
* tuiLayout.c (_extractDisplayStartAddr): Likewise.
(tuiSetLayout): Likewise.
* tuiSourceWin.c (tuiDisplayMainFunction): Likewise.
(tuiUpdateSourceWindowsWithAddr): Likewise.
(tuiUpdateSourceWindowsWithLine): Likewise.
(tuiSetHasBreakAt): Likewise.
* tuiStack.c (tuiSetLocatorInfo): Likewise.
(tuiSwitchFilename): Likewise.
(tuiUpdateLocatorInfoFromFrame): Likewise.
(tuiSetLocatorContent): Likewise.
(tuiShowFrameInfo): Likewise.
* tuiDisassem.h: Update prototypes to use CORE_ADDR.
* tuiSourceWin.h: Likewise.
* tuiStack.h: Likewise.
+2001-07-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * tuiData.h (TuiLocatorElement): Use CORE_ADDR for address member.
+ (TuiLineOrAddress): Likewise.
+ * tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
+ an address.
+ (tuiSetDisassemContent): Likewise.
+ (tuiShowDisassem, tuiShowDisassemAndUpdateSource): Likewise.
+ * tuiLayout.c (_extractDisplayStartAddr): Likewise.
+ (tuiSetLayout): Likewise.
+ * tuiSourceWin.c (tuiDisplayMainFunction): Likewise.
+ (tuiUpdateSourceWindowsWithAddr): Likewise.
+ (tuiUpdateSourceWindowsWithLine): Likewise.
+ (tuiSetHasBreakAt): Likewise.
+ * tuiStack.c (tuiSetLocatorInfo): Likewise.
+ (tuiSwitchFilename): Likewise.
+ (tuiUpdateLocatorInfoFromFrame): Likewise.
+ (tuiSetLocatorContent): Likewise.
+ (tuiShowFrameInfo): Likewise.
+ * tuiDisassem.h: Update prototypes to use CORE_ADDR.
+ * tuiSourceWin.h: Likewise.
+ * tuiStack.h: Likewise.
+
2001-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* tuiWin.c: Add missing includes.
typedef union _TuiLineOrAddress
{
int lineNo;
- Opaque addr;
+ CORE_ADDR addr;
}
TuiLineOrAddress, *TuiLineOrAddressPtr;
char fileName[MAX_LOCATOR_ELEMENT_LEN];
char procName[MAX_LOCATOR_ELEMENT_LEN];
int lineNo;
- Opaque addr;
+ CORE_ADDR addr;
}
TuiLocatorElement, *TuiLocatorElementPtr;
** Function to set the disassembly window's content.
*/
TuiStatus
-tuiSetDisassemContent (struct symtab *s, Opaque startAddr)
+tuiSetDisassemContent (struct symtab *s, CORE_ADDR startAddr)
{
TuiStatus ret = TUI_FAILURE;
struct ui_file *gdb_dis_out;
- if (startAddr != (Opaque) NULL)
+ if (startAddr != 0)
{
register int i, desc;
disassemWin->detail.sourceInfo.startLineOrAddr.addr = startAddr;
/* Now construct each line */
- for (curLine = 0, pc = (CORE_ADDR) startAddr; (curLine < maxLines);)
+ for (curLine = 0, pc = startAddr; (curLine < maxLines);)
{
TuiWinElementPtr element = (TuiWinElementPtr) disassemWin->generic.content[curLine];
struct breakpoint *bp;
** Function to display the disassembly window with disassembled code.
*/
void
-tuiShowDisassem (Opaque startAddr)
+tuiShowDisassem (CORE_ADDR startAddr)
{
- struct symtab *s = find_pc_symtab ((CORE_ADDR) startAddr);
+ struct symtab *s = find_pc_symtab (startAddr);
TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
tuiAddWinToLayout (DISASSEM_WIN);
** Function to display the disassembly window.
*/
void
-tuiShowDisassemAndUpdateSource (Opaque startAddr)
+tuiShowDisassemAndUpdateSource (CORE_ADDR startAddr)
{
struct symtab_and_line sal;
** 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 ((CORE_ADDR) startAddr, 0);
+ sal = find_pc_line (startAddr, 0);
current_source_symtab = sal.symtab;
tuiUpdateSourceWindow (srcWin, sal.symtab, (Opaque) sal.line, TRUE);
tuiUpdateLocatorFilename (sal.symtab->filename);
/*
** tuiGetBeginAsmAddress().
*/
-Opaque
+CORE_ADDR
tuiGetBeginAsmAddress (void)
{
TuiGenWinInfoPtr locator;
TuiLocatorElementPtr element;
- Opaque addr;
+ CORE_ADDR addr;
locator = locatorWinInfoPtr ();
element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator;
- if (element->addr == (Opaque) 0)
+ if (element->addr == 0)
{
/*the target is not executing, because the pc is 0 */
- addr = (Opaque) parse_and_eval_address ("main");
+ addr = parse_and_eval_address ("main");
- if (addr == (Opaque) 0)
- addr = (Opaque) parse_and_eval_address ("MAIN");
+ if (addr == 0)
+ addr = parse_and_eval_address ("MAIN");
}
else /* the target is executing */
/*****************************************
** PUBLIC FUNCTION EXTERNAL DECLS **
******************************************/
-extern TuiStatus tuiSetDisassemContent (struct symtab *, Opaque);
-extern void tuiShowDisassem (Opaque);
+extern TuiStatus tuiSetDisassemContent (struct symtab *, CORE_ADDR);
+extern void tuiShowDisassem (CORE_ADDR);
extern void tuiShowDisassemAndUpdateSource (Opaque);
extern void tuiVerticalDisassemScroll (TuiScrollDirection, int);
-extern Opaque tuiGetBeginAsmAddress (void);
+extern CORE_ADDR tuiGetBeginAsmAddress (void);
#endif
/*_TUI_DISASSEM_H*/
static void _tui_vToggleLayout_command (va_list);
static void _tuiToggleSplitLayout_command (char *, int);
static void _tui_vToggleSplitLayout_command (va_list);
-static Opaque _extractDisplayStartAddr (void);
+static CORE_ADDR _extractDisplayStartAddr (void);
static void _tuiHandleXDBLayout (TuiLayoutDefPtr);
static TuiStatus _tuiSetLayoutTo (char *);
{
TuiLayoutType curLayout = currentLayout (), newLayout = UNDEFINED_LAYOUT;
int regsPopulate = FALSE;
- Opaque addr = _extractDisplayStartAddr ();
+ CORE_ADDR addr = _extractDisplayStartAddr ();
TuiWinInfoPtr newWinWithFocus = (TuiWinInfoPtr) NULL, winWithFocus = tuiWinWithFocus ();
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
} /* _tuiSetLayoutTo */
-static Opaque
+static CORE_ADDR
_extractDisplayStartAddr (void)
{
TuiLayoutType curLayout = currentLayout ();
- Opaque addr;
+ CORE_ADDR addr;
CORE_ADDR pc;
switch (curLayout)
find_line_pc (current_source_symtab,
srcWin->detail.sourceInfo.startLineOrAddr.lineNo,
&pc);
- addr =(Opaque) pc;
+ addr = pc;
break;
case DISASSEM_COMMAND:
case SRC_DISASSEM_COMMAND:
addr = disassemWin->detail.sourceInfo.startLineOrAddr.addr;
break;
default:
- addr = (Opaque) NULL;
+ addr = 0;
break;
}
#include "tui.h"
#include "tuiData.h"
#include "tuiStack.h"
+#include "tuiWin.h"
+#include "tuiGeneralWin.h"
#include "tuiSourceWin.h"
#include "tuiSource.h"
#include "tuiDisassem.h"
CORE_ADDR addr;
addr = parse_and_eval_address ("main");
- if (addr <= (CORE_ADDR) 0)
+ if (addr == (CORE_ADDR) 0)
addr = parse_and_eval_address ("MAIN");
- if (addr > (CORE_ADDR) 0)
+ if (addr != (CORE_ADDR) 0)
{
struct symtab_and_line sal;
- tuiUpdateSourceWindowsWithAddr ((Opaque) addr);
+ tuiUpdateSourceWindowsWithAddr (addr);
sal = find_pc_line (addr, 0);
tuiSwitchFilename (sal.symtab->filename);
}
** reflect the input address.
*/
void
-tuiUpdateSourceWindowsWithAddr (Opaque addr)
+tuiUpdateSourceWindowsWithAddr (CORE_ADDR addr)
{
- if (addr > (Opaque) NULL)
+ if (addr != 0)
{
struct symtab_and_line sal;
tuiShowDisassemAndUpdateSource (addr);
break;
default:
- sal = find_pc_line ((CORE_ADDR) addr, 0);
- tuiShowSource (sal.symtab,
- (Opaque) sal.line,
- FALSE);
+ sal = find_pc_line (addr, 0);
+ tuiShowSource (sal.symtab, sal.line, FALSE);
break;
}
}
case DISASSEM_COMMAND:
case DISASSEM_DATA_COMMAND:
find_line_pc (s, line, &pc);
- tuiUpdateSourceWindowsWithAddr ((Opaque) pc);
+ tuiUpdateSourceWindowsWithAddr (pc);
break;
default:
- tuiShowSource (s, (Opaque) line, FALSE);
+ tuiShowSource (s, line, FALSE);
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);
- tuiShowDisassem ((Opaque) pc);
+ tuiShowDisassem (pc);
}
break;
}
}
else
gotIt = (content[i]->whichElement.source.lineOrAddr.addr
- == (Opaque) bp->address);
+ == bp->address);
if (gotIt)
{
content[i]->whichElement.source.hasBreak = hasBreak;
int);
extern void tuiUpdateSourceWindowAsIs (TuiWinInfoPtr, struct symtab *, Opaque,
int);
-extern void tuiUpdateSourceWindowsWithAddr (Opaque);
+extern void tuiUpdateSourceWindowsWithAddr (CORE_ADDR);
extern void tui_vUpdateSourceWindowsWithAddr (va_list);
extern void tuiUpdateSourceWindowsWithLine (struct symtab *, int);
extern void tui_vUpdateSourceWindowsWithLine (va_list);
*/
void
tuiSetLocatorInfo (char *fname, char *procname, int lineNo,
- Opaque addr, TuiLocatorElementPtr element)
+ CORE_ADDR addr, TuiLocatorElementPtr element)
{
#ifdef COMMENT
/* first free the old info */
strcat_to_buf (element->procName, MAX_LOCATOR_ELEMENT_LEN, procname);
#endif
element->lineNo = lineNo;
- element->addr = (Opaque) addr;
+ element->addr = addr;
return;
} /* tuiSetLocatorInfo */
tuiSetLocatorInfo (fileName,
(char *) NULL,
0,
- (Opaque) NULL,
+ (CORE_ADDR) 0,
&((TuiWinElementPtr) locator->content[0])->whichElement.locator);
tuiShowLocatorContent ();
tuiSetLocatorInfo (symtabAndLine.symtab->filename,
_getFuncNameFromFrame (frameInfo),
symtabAndLine.line,
- (Opaque) frameInfo->pc,
+ frameInfo->pc,
element);
else
tuiSetLocatorInfo ((char *) NULL,
_getFuncNameFromFrame (frameInfo),
0,
- (Opaque) frameInfo->pc,
+ frameInfo->pc,
element);
return;
tuiSetLocatorInfo ((char *) NULL,
(char *) NULL,
0,
- (Opaque) NULL,
+ (CORE_ADDR) 0,
&((TuiWinElementPtr) locator->content[0])->whichElement.locator);
return;
} /* tuiSetLocatorContent */
if (find_pc_partial_function (fi->pc, (char **) NULL, &low, (CORE_ADDR) NULL) == 0)
error ("No function contains program counter for selected frame.\n");
else
- low = (CORE_ADDR) tuiGetLowDisassemblyAddress ((Opaque) low, (Opaque) fi->pc);
+ low = tuiGetLowDisassemblyAddress (low, fi->pc);
}
if (winInfo == srcWin)
** This header file supports
*/
-extern void tuiSetLocatorInfo (char *, char *, int, Opaque,
+extern void tuiSetLocatorInfo (char *, char *, int, CORE_ADDR,
TuiLocatorElementPtr);
extern void tuiUpdateLocatorFilename (char *);
extern void tui_vUpdateLocatorFilename (va_list);