Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324613 - [disassembly] maximizing then minimizing causes debug stack view event to force return to PC
Summary: [disassembly] maximizing then minimizing causes debug stack view event to for...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Pawel Piech CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 23:22 EDT by Kirk Beitz CLA
Modified: 2010-09-08 03:23 EDT (History)
3 users (show)

See Also:


Attachments
non-working patch attempting to show the direction i started in attempting to fix this problem (3.81 KB, patch)
2010-09-06 23:22 EDT, Kirk Beitz CLA
no flags Details | Diff
Fix (2.78 KB, patch)
2010-09-07 05:01 EDT, Anton Leherbauer CLA
aleherb+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirk Beitz CLA 2010-09-06 23:22:48 EDT
Created attachment 178291 [details]
non-working patch attempting to show the direction i started in attempting to fix this problem

steps to reproduce:
1) scroll away from the PC in the disassembly view
2) double-click the tab for the disassembly view to maximize
3) double-click after it maximizes

ACTUAL RESULT: it returns to the PC location of that frame
EXPECTED RESULT: minimize without changing the scroll location of the view

root cause: the re-exposure of the debug-stack view causes an event that forces a pending-PC update.

i don't have a working solution.

in the interest of what i thought should have solved the problem, i'm attaching the patch of what i changed to try to prevent the pending-PC updates.

however, the biggest negative side-effect is that fFrameAddress doesn't always get set properly in all cases using this patch.

my sense is that if fFrameAddress were to get properly set directly from a call to updatePC(), then it wouldn't be necessary to rely entirely on updateVisibleArea() to make the calls that result in fFrameAddress to get properly set.  i'm just not entirely certain where to make such a call.

in any case, i'm hoping that there is agreement regarding the expected result, that the problem is easily reproduced, and that the attempt i made to solve the problem might lead someone else familiar with the code to have a good idea of what to do in order to prevent this boomerang effect.
Comment 1 Anton Leherbauer CLA 2010-09-07 05:01:55 EDT
Created attachment 178303 [details]
Fix

The solution is to listen to debug context changes instead of selection changes in the debug view.
Comment 2 Kirk Beitz CLA 2010-09-07 18:06:11 EDT
toni ++

i've applied this patch, and it solves the problem i was seeing.

thanks
Comment 3 Anton Leherbauer CLA 2010-09-08 02:32:33 EDT
Thanks for verifying.  Committed to HEAD.
Comment 4 CDT Genie CLA 2010-09-08 03:23:04 EDT
*** cdt cvs genie on behalf of aleherbau ***
Bug 324613 - [disassembly] maximizing then minimizing causes debug stack view event to force return to PC

[*] DisassemblyView.java 1.5 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/DisassemblyView.java?root=Tools_Project&r1=1.4&r2=1.5