Bug 323552 - [registers] Register View content is not stack frame specific
Summary: [registers] Register View content is not stack frame specific
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 6.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.3.0   Edit
Assignee: Alvaro Sanchez-Leon CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 414894
  Show dependency tree
 
Reported: 2010-08-24 21:58 EDT by xingyun CLA
Modified: 2013-09-27 12:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xingyun CLA 2010-08-24 21:58:36 EDT
[Description]
     Register View doesn't refresh when switching between different stack frames

[Software]
     CDT6.0.2, debugging with DSF launchers

[Details]
     in CLI mode, we switch to a stack frame and the registers content gets changed.
     in CDT-DSF, Register View is not stack frame specific, it only updates on selecting different threads.
  
     It's the same with CDT 7.0

[Code]
     We've found some hints from the comments from:
org.eclipse.cdt.dsf.debug.ui.viewmodel.register.RegisterVMProvider 
        Line 168, update()

[Proposal]
     N/A
Comment 1 xingyun CLA 2010-08-24 21:59:49 EDT
The original discussion can be reached at: http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg20203.html
Comment 2 Marc Khouzam CLA 2010-08-24 22:26:18 EDT
My impression is that this bug should be for DSF.  I think registers should be stack-frame specific, but I need some background on the current DSF design of this to be sure.

Until then, for DSF-GDB, I think Mikhail's effort to move registers to variable object may indirectly fix this problem.  See bug 317892.
Comment 3 Nobody - feel free to take it CLA 2010-08-24 23:13:16 EDT
(In reply to comment #2)
> My impression is that this bug should be for DSF.  I think registers should be
> stack-frame specific, but I need some background on the current DSF design of
> this to be sure.
> 

This feature has been supported by CDI since CDT 3.0 but was broken by a platform bug in Eclipse 3.4. I fixed it for CDT 7.0.

> Until then, for DSF-GDB, I think Mikhail's effort to move registers to variable
> object may indirectly fix this problem.  See bug 317892.

Unfortunately, my patch doesn't address this issue. To implement it var-objects for registers should be treated like var-objects for expressions. Currently, the var-objects for registers are evaluated in the context of GDB, not the context of Eclipse.
Comment 4 Marc Khouzam CLA 2010-08-25 06:49:03 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > My impression is that this bug should be for DSF.  I think registers should be
> > stack-frame specific, but I need some background on the current DSF design of
> > this to be sure.
> > 
> 
> This feature has been supported by CDI since CDT 3.0 but was broken by a
> platform bug in Eclipse 3.4. I fixed it for CDT 7.0.

Bug 308055.

> > Until then, for DSF-GDB, I think Mikhail's effort to move registers to variable
> > object may indirectly fix this problem.  See bug 317892.
> 
> Unfortunately, my patch doesn't address this issue. To implement it var-objects
> for registers should be treated like var-objects for expressions. Currently,
> the var-objects for registers are evaluated in the context of GDB, not the
> context of Eclipse.

Ah yes, I see that now.  Once your final solution is posted and committed, maybe it won't be too bad to adapt it for this feature.

I'm hesitant to suggest changes to the current MIRegisters service et al. if we are going to stop using it soon :-)
Comment 5 Alvaro Sanchez-Leon CLA 2013-09-18 15:40:50 EDT
A proposed solution is now available in Gerrit:

https://git.eclipse.org/r/#/c/16566/


Note: this solution may need to be lifted to a different structure once bug 317892 is decided.
Comment 6 Marc Khouzam CLA 2013-09-27 10:08:11 EDT
Committed to master from Gerrit.

Thanks Alvaro!
Comment 7 Alvaro Sanchez-Leon CLA 2013-09-27 12:49:57 EDT
(In reply to Marc Khouzam from comment #6)
> Committed to master from Gerrit.
> 
> Thanks Alvaro!

Thank you for the good review !