Community
Participate
Working Groups
- 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.
BTW, I tried this on Helios M5
Is this observed with GDB? It's up to the debug services to generate an event to update the views.
This works with DSF-GDB
This doesn't work for me in DSF-GDB. Not sure how it's working for Marc.
(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?
(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'
(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.