Community
Participate
Working Groups
in the disassembly view, notice that upon performing pageUp a couple of times (and this will also occur with pageDown scrolling), a section of disassembly is displayed that is not adjacent to the disassembly that was being displayed to the user prior to the scroll. it may then take a little effort to get back to the disassembly that the user was trying to look at in the first place. i've noticed this for a while, and it has been a bit disconcerting, but i've tried to get used to it. however, we are getting additional reports from folks who would prefer that pageUp/pageDown would always retrieve adjacent disassembly, as opposed to jumping over the gap, and then getting the disassembly on the other side of the gap. in other words, when scrolling up, if a "..." section is encountered, check to see what operation caused that to occur, and if it was a pageUp, attempt to acquire the memory on the bottom of the gap.
Created attachment 193234 [details] code to try to stay closer to previous focus when user scrolls via keypress the attached patch attempts to improve the user experience by utilizing keypress scrolling to indicate a desire for continuity on the user's part (versus scrollbar scrolling, where the user may be more interested in scrolling over/past disabled ranges). please review the patch and try it out. for your own testing/trials … i've found it was most likely to scroll over a disabled-range boundary (using the edc x86 debugger, so probably also with the gdb x86 debugger) if i set the cursor near the top of the disassembly window and then scrolled up or near the bottom and scrolled down, as this would be more likely to set the post-scroll cursor beyond the "..." location representing a disabled range. after applying this patch, scrolling via pageUp/pageDown feels significantly improved to me, while still allowing using the scrollbar elevator or trackpad swipe-scrolling to jump over ranges as possibly desired. (we would also like to apply this patch to the CDT_7_0 branch if it is considered ok to do so, since our next product update coming soon would still depend on that branch.)
Created attachment 193251 [details] Alternative fix I tried your patch and it is an improvement, but I think it seems a bit fragile. Twice I got into a situation where the view would no longer update. This seems to be caused by the gotoAddress() call inside updateVisibleArea(). Anyway, I tried a different approach by directly handling the page up/down key presses. Please give it a try.
Created attachment 193304 [details] Alternative fix plus arrowUp/arrowDown cases (In reply to comment #2) > Created attachment 193251 [details] > Alternative fix > > I tried your patch and it is an improvement, but I think it seems a bit > fragile. Twice I got into a situation where the view would no longer update. > This seems to be caused by the gotoAddress() call inside updateVisibleArea(). > Anyway, I tried a different approach by directly handling the page up/down key > presses. Please give it a try. thanks for your contribution! page scrolling is much smoother with this approach, no doubt. while i hadn't experienced complete the "no longer update" scenario you mentioned, scrolling was much jumpier with my original patch. one thing i had been trying to address with my patch was arrow-up/arrow-down scrolling as well (as represented by the use of generic KEY in the original patch). i've re-factored your patch a bit in my attempt to include arrowUp/arrowDown: • combined pageUp() & pageDown() into keyScroll(int keyCode) in DisassemblyPart (the 2 algorithms already had much in common) • return boolean indicating true if keyScroll() processes the key (this allows it to be ignored when no viewport change occurs) my extended thanks in advance for your review of this new patch.
Very good! I like it. Committed to HEAD and cdt_7_0.
*** cdt cvs genie on behalf of aleherbau *** Bug 331629 - [disassembly] pageUp/pageDown scrolling jumps over unknown sections unexpectedly In cooperation with Kirk Beitz [*] DisassemblyViewer.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyViewer.java?root=Tools_Project&r1=1.3&r2=1.4 [*] DisassemblyPart.java 1.48 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java?root=Tools_Project&r1=1.47&r2=1.48 [*] DisassemblyViewer.java 1.2.2.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyViewer.java?root=Tools_Project&r1=1.2.2.1&r2=1.2.2.2 [*] DisassemblyPart.java 1.31.2.9 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java?root=Tools_Project&r1=1.31.2.8&r2=1.31.2.9