[PATCH]: Fix TUI disassembling scrolling
Stephane Carrez
stcarrez@nerim.fr
Tue Aug 27 15:14:00 GMT 2002
Hi!
To scroll backward in the TUI disassembling window, the TUI computes
the starting address by subtracting constant offsets (4). This works only if
each instruction is of the same size. For i386 and 68HC11 where we can
have instructions of 1 or several bytes, this results in random position
of the window.
This patch solves this by disassembling from the beginning of the/a function
and until we obtain the backward scroll (that is last disassembly line of
the window corresponds to the current top address).
Committed on mainline.
Stephane
2002-08-28 Stephane Carrez <stcarrez@nerim.fr>
* tuiDisassem.c (tui_disassemble): New function to disassemble
several lines in a buffer.
(tui_find_disassembly_address): New function to search backward
or forward a disassembly line.
(tuiSetDisassemContent): Use tui_disassemble to obtain the real
content and format it in the window.
(tuiShowDisassemAndUpdateSource): Remove unused locals.
(tuiVerticalDisassemScroll): Use tui_find_disassembly_address to
obtain the address to disassemble for the scrolling.
* tuiDisassem.h (tuiGetBeginAsmAddress): Update.
* tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Don't pass symtab.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tui-disassem.diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020827/71033430/attachment.ksh>
More information about the Gdb-patches
mailing list