mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
Do not request to dispose local variables when the target is resumed.
This commit is contained in:
parent
0bf6b02659
commit
d5a0e947ff
4 changed files with 35 additions and 17 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-11-24 Mikhail Khodjaiants
|
||||||
|
Do not request to dispose local variables when the target is resumed.
|
||||||
|
* CExpression.java
|
||||||
|
* CGlobalVariable.java
|
||||||
|
* CVariable.java
|
||||||
|
|
||||||
2004-11-23 Mikhail Khodjaiants
|
2004-11-23 Mikhail Khodjaiants
|
||||||
The enablement of the step actions is calculated in the UI thread. This causes
|
The enablement of the step actions is calculated in the UI thread. This causes
|
||||||
the UI locks for slow or unresponsive targets. Use the cached stack frames to
|
the UI locks for slow or unresponsive targets. Use the cached stack frames to
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class CExpression extends CVariable implements IExpression {
|
||||||
((AbstractCValue)fValue).dispose();
|
((AbstractCValue)fValue).dispose();
|
||||||
fValue = null;
|
fValue = null;
|
||||||
}
|
}
|
||||||
super.dispose();
|
internalDispose( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -73,4 +73,11 @@ public class CGlobalVariable extends CVariable implements ICGlobalVariable {
|
||||||
public IGlobalVariableDescriptor getDescriptor() {
|
public IGlobalVariableDescriptor getDescriptor() {
|
||||||
return fDescriptor;
|
return fDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
internalDispose( true );
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -167,9 +167,9 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
return fType;
|
return fType;
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized void invalidate() {
|
synchronized void invalidate( boolean destroy ) {
|
||||||
try {
|
try {
|
||||||
if ( fCDIVariable != null )
|
if ( destroy && fCDIVariable != null )
|
||||||
fCDIVariable.dispose();
|
fCDIVariable.dispose();
|
||||||
}
|
}
|
||||||
catch( CDIException e ) {
|
catch( CDIException e ) {
|
||||||
|
@ -182,8 +182,8 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
fType = null;
|
fType = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dispose() {
|
void dispose( boolean destroy ) {
|
||||||
invalidate();
|
invalidate( destroy );
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isSameVariable( ICDIVariable cdiVar ) {
|
boolean isSameVariable( ICDIVariable cdiVar ) {
|
||||||
|
@ -389,10 +389,10 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
public void setEnabled( boolean enabled ) throws DebugException {
|
public void setEnabled( boolean enabled ) throws DebugException {
|
||||||
InternalVariable iv = getOriginal();
|
InternalVariable iv = getOriginal();
|
||||||
if ( iv != null )
|
if ( iv != null )
|
||||||
iv.invalidate();
|
iv.dispose( true );
|
||||||
iv = getShadow();
|
iv = getShadow();
|
||||||
if ( iv != null )
|
if ( iv != null )
|
||||||
iv.invalidate();
|
iv.dispose( true );
|
||||||
fIsEnabled = enabled;
|
fIsEnabled = enabled;
|
||||||
fireChangeEvent( DebugEvent.STATE );
|
fireChangeEvent( DebugEvent.STATE );
|
||||||
}
|
}
|
||||||
|
@ -520,7 +520,7 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
if ( current != null ) {
|
if ( current != null ) {
|
||||||
InternalVariable newVar = current.createShadow( startIndex, length );
|
InternalVariable newVar = current.createShadow( startIndex, length );
|
||||||
if ( getShadow() != null )
|
if ( getShadow() != null )
|
||||||
getShadow().dispose();
|
getShadow().dispose( true );
|
||||||
setShadow( newVar );
|
setShadow( newVar );
|
||||||
fireChangeEvent( DebugEvent.STATE );
|
fireChangeEvent( DebugEvent.STATE );
|
||||||
}
|
}
|
||||||
|
@ -609,7 +609,7 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
if ( current != null ) {
|
if ( current != null ) {
|
||||||
InternalVariable newVar = current.createShadow( type );
|
InternalVariable newVar = current.createShadow( type );
|
||||||
if ( getShadow() != null )
|
if ( getShadow() != null )
|
||||||
getShadow().dispose();
|
getShadow().dispose( true );
|
||||||
setShadow( newVar );
|
setShadow( newVar );
|
||||||
fireChangeEvent( DebugEvent.STATE );
|
fireChangeEvent( DebugEvent.STATE );
|
||||||
}
|
}
|
||||||
|
@ -624,7 +624,7 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
InternalVariable oldVar = getShadow();
|
InternalVariable oldVar = getShadow();
|
||||||
setShadow( null );
|
setShadow( null );
|
||||||
if ( oldVar != null )
|
if ( oldVar != null )
|
||||||
oldVar.dispose();
|
oldVar.dispose( true );
|
||||||
InternalVariable iv = getOriginal();
|
InternalVariable iv = getOriginal();
|
||||||
if ( iv != null )
|
if ( iv != null )
|
||||||
iv.invalidateValue();
|
iv.invalidateValue();
|
||||||
|
@ -755,13 +755,8 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
|
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#dispose()
|
||||||
*/
|
*/
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
getCDISession().getEventManager().removeEventListener( this );
|
// Hack: do not destroy local variables
|
||||||
InternalVariable iv = getOriginal();
|
internalDispose( false );
|
||||||
if ( iv != null )
|
|
||||||
iv.dispose();
|
|
||||||
iv = getShadow();
|
|
||||||
if ( iv != null )
|
|
||||||
iv.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int sizeof() {
|
protected int sizeof() {
|
||||||
|
@ -807,4 +802,14 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
if ( iv != null )
|
if ( iv != null )
|
||||||
iv.preserve();
|
iv.preserve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void internalDispose( boolean destroy ) {
|
||||||
|
getCDISession().getEventManager().removeEventListener( this );
|
||||||
|
InternalVariable iv = getOriginal();
|
||||||
|
if ( iv != null )
|
||||||
|
iv.dispose( destroy );
|
||||||
|
iv = getShadow();
|
||||||
|
if ( iv != null )
|
||||||
|
iv.dispose( destroy );
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue