Bug 301556 - [Variables View] Changes in Expressions view doesn't reflect in Variables view
Summary: [Variables View] Changes in Expressions view doesn't reflect in Variables view
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-02 11:51 EST by Navid Mehregani CLA
Modified: 2020-09-04 15:25 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 Navid Mehregani CLA 2010-02-02 11:51:48 EST
- Create a simple C++ application that defines an integer 'i' 
- Start a DSF debug session
- Open Variable and Expression views side by side
- In Expressions view, add the following expression: i=5+5
- Notice that the value of 'i' doesn't change in Variables view.  
This does work properly when using the standard debug model to debug a Java application.
Comment 1 Navid Mehregani CLA 2010-02-02 11:52:27 EST
BTW, I tried this on Helios M5
Comment 2 Pawel Piech CLA 2010-02-02 11:53:41 EST
Is this observed with GDB?  It's up to the debug services to generate an event to update the views.
Comment 3 Marc Khouzam CLA 2010-02-02 11:55:01 EST
This works with DSF-GDB
Comment 4 Navid Mehregani CLA 2010-02-02 12:07:10 EST
This doesn't work for me in DSF-GDB.  Not sure how it's working for Marc.
Comment 5 Marc Khouzam CLA 2010-02-02 13:14:25 EST
(In reply to comment #0)
> - Create a simple C++ application that defines an integer 'i' 
> - Start a DSF debug session
> - Open Variable and Expression views side by side
> - In Expressions view, add the following expression: i=5+5
> - Notice that the value of 'i' doesn't change in Variables view.  
> This does work properly when using the standard debug model to debug a Java
> application.

Sorry, I jumped the gun here.

Making the name of an expression 'i=5+5' is not something I ever tried before.  I see now that it does change the value of i in GDB, but that it is not reflected in the views.  In fact, in your case if you create a second expression called i again, I bet it will show the old value, no?

To be honest I don't quite understand why GDB would change the value of i if I create an expression i=5+5.  Is this a documented GDB feature?
Comment 6 Navid Mehregani CLA 2010-02-03 09:51:22 EST
(In reply to comment #5)
> Sorry, I jumped the gun here.
> 
> Making the name of an expression 'i=5+5' is not something I ever tried before. 
> I see now that it does change the value of i in GDB, but that it is not
> reflected in the views.  In fact, in your case if you create a second
> expression called i again, I bet it will show the old value, no?

Creating a second expression called i will have the correct (i.e. new) value.

> To be honest I don't quite understand why GDB would change the value of i if I
> create an expression i=5+5.  Is this a documented GDB feature?

To me, it seems logical for the value of 'i' to change when evaluating an expression such as 'i=5+5'
Comment 7 Marc Khouzam CLA 2010-02-03 10:30:20 EST
(In reply to comment #6)
> (In reply to comment #5)
> > Sorry, I jumped the gun here.
> > 
> > Making the name of an expression 'i=5+5' is not something I ever tried before. 
> > I see now that it does change the value of i in GDB, but that it is not
> > reflected in the views.  In fact, in your case if you create a second
> > expression called i again, I bet it will show the old value, no?
> 
> Creating a second expression called i will have the correct (i.e. new) value.
> 
> > To be honest I don't quite understand why GDB would change the value of i if I
> > create an expression i=5+5.  Is this a documented GDB feature?
> 
> To me, it seems logical for the value of 'i' to change when evaluating an
> expression such as 'i=5+5'

There is something we need to fix here, but the solution is not obvious to me.  This feels like a back-door to me.  The user can change variables without using the proper call to the MIExpressions service.  It's kind of like changing a variable from the console.

I'm open to suggestions on how to handle this.