mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
When the target supports runtime type identification clear out the cached type when a new value is created. Also fix a problem with global variables not always being updated.
This commit is contained in:
parent
1b35e42b33
commit
41b04c93d1
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,7 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentDescriptor;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
|
||||||
|
@ -231,6 +232,9 @@ public class CGlobalVariable extends CVariable implements ICGlobalVariable {
|
||||||
fValue = CValueFactory.createValue( getVariable(), cdiValue );
|
fValue = CValueFactory.createValue( getVariable(), cdiValue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (getCDITarget().getConfiguration() instanceof ICDITargetConfiguration2 &&
|
||||||
|
((ICDITargetConfiguration2)getCDITarget().getConfiguration()).supportsRuntimeTypeIdentification())
|
||||||
|
fType = null; // When the debugger supports RTTI getting a new value may also mean a new type.
|
||||||
}
|
}
|
||||||
catch( CDIException e ) {
|
catch( CDIException e ) {
|
||||||
requestFailed( e.getMessage(), e );
|
requestFailed( e.getMessage(), e );
|
||||||
|
@ -347,6 +351,7 @@ public class CGlobalVariable extends CVariable implements ICGlobalVariable {
|
||||||
ICDITarget cdiTarget = source.getTarget();
|
ICDITarget cdiTarget = source.getTarget();
|
||||||
if ( getCDITarget().equals( cdiTarget ) ) {
|
if ( getCDITarget().equals( cdiTarget ) ) {
|
||||||
setChanged( false );
|
setChanged( false );
|
||||||
|
resetValue(); // Reset the value cache so the display value will be updated.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue