mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 20:55:44 +02:00
The registers with errors shouldn't be disposed when the target is suspended. Added synchronization to the "getRegisters" method.
This commit is contained in:
parent
a644748bb8
commit
c16a83969c
2 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-07-29 Mikhail Khodjaiants
|
||||||
|
The registers with errors shouldn't be disposed when the target is suspended.
|
||||||
|
Added synchronization to the "getRegisters" method.
|
||||||
|
* CRegisterGroup.java
|
||||||
|
|
||||||
2005-07-28 Mikhail Khodjaiants
|
2005-07-28 Mikhail Khodjaiants
|
||||||
Bug 104421: Register view can not show correct value when switch between different thread or stack frame.
|
Bug 104421: Register view can not show correct value when switch between different thread or stack frame.
|
||||||
* ICDIRegister.java
|
* ICDIRegister.java
|
||||||
|
|
|
@ -80,9 +80,13 @@ public class CRegisterGroup extends CDebugElement implements IPersistableRegiste
|
||||||
if ( fDisposed )
|
if ( fDisposed )
|
||||||
return new IRegister[0];
|
return new IRegister[0];
|
||||||
if ( fRegisters == null ) {
|
if ( fRegisters == null ) {
|
||||||
fRegisters = new IRegister[fRegisterDescriptors.length];
|
synchronized( this ) {
|
||||||
for( int i = 0; i < fRegisters.length; ++i ) {
|
if ( fRegisters == null ) {
|
||||||
fRegisters[i] = new CRegister( this, fRegisterDescriptors[i] );
|
fRegisters = new IRegister[fRegisterDescriptors.length];
|
||||||
|
for( int i = 0; i < fRegisters.length; ++i ) {
|
||||||
|
fRegisters[i] = new CRegister( this, fRegisterDescriptors[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fRegisters;
|
return fRegisters;
|
||||||
|
@ -101,13 +105,12 @@ public class CRegisterGroup extends CDebugElement implements IPersistableRegiste
|
||||||
}
|
}
|
||||||
|
|
||||||
public void targetSuspended() {
|
public void targetSuspended() {
|
||||||
if (fRegisters == null) {
|
if ( fRegisters == null ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for ( int i = 0; i < fRegisters.length; ++i ) {
|
for ( int i = 0; i < fRegisters.length; ++i ) {
|
||||||
if ( fRegisters[i] != null && ((CRegister)fRegisters[i]).hasErrors() ) {
|
if ( fRegisters[i] != null && ((CRegister)fRegisters[i]).hasErrors() ) {
|
||||||
((CRegister)fRegisters[i]).dispose();
|
((CRegister)fRegisters[i]).resetStatus();
|
||||||
fRegisters[i] = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue