* tui.c (tuiGetLowDisassemblyAddress): Moved from here.

* tuiDisassem.c (tuiGetLowDisassemblyAddress): To here, and use
	tui_find_disassembly_address to find the starting address of
	disassemble window.
This commit is contained in:
Stephane Carrez 2002-08-28 20:33:27 +00:00
parent bfb3754e3d
commit 77cad3ba61
3 changed files with 25 additions and 25 deletions

View file

@ -382,6 +382,24 @@ tuiGetBeginAsmAddress (void)
return addr;
} /* tuiGetBeginAsmAddress */
/* Determine what the low address will be to display in the TUI's
disassembly window. This may or may not be the same as the
low address input. */
CORE_ADDR
tuiGetLowDisassemblyAddress (CORE_ADDR low, CORE_ADDR pc)
{
int pos;
/* Determine where to start the disassembly so that the pc is about in the
middle of the viewport. */
pos = tuiDefaultWinViewportHeight (DISASSEM_WIN, DISASSEM_COMMAND) / 2;
pc = tui_find_disassembly_address (pc, -pos);
if (pc < low)
pc = low;
return pc;
}
/*
** tuiVerticalDisassemScroll().
** Scroll the disassembly forward or backward vertically