Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorAnton Leherbauer2009-10-16 07:57:38 +0000
committerAnton Leherbauer2009-10-16 07:57:38 +0000
commit54d204a9859fdc88286e668248ffb6ec68a816b2 (patch)
tree8c1267baa19f001720fd9fb56e81e774b5ec4cdd /dsf
parent06b3823732a6a7f999687391e99f7bae678f8027 (diff)
downloadorg.eclipse.cdt-54d204a9859fdc88286e668248ffb6ec68a816b2.tar.gz
org.eclipse.cdt-54d204a9859fdc88286e668248ffb6ec68a816b2.tar.xz
org.eclipse.cdt-54d204a9859fdc88286e668248ffb6ec68a816b2.zip
[292271] Protect against race condition due to asynchronously removing the service event listener
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index 3910fec6f90..140c682215d 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -280,7 +280,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
private BigInteger fGotoAddressPending= PC_UNKNOWN;
private BigInteger fFocusAddress= PC_UNKNOWN;
private int fBufferZone;
- private IExecutionDMContext fTargetContext;
+ private volatile IExecutionDMContext fTargetContext;
private String fDebugSessionId;
private int fTargetFrame;
private DisassemblyIPAnnotation fPCAnnotation;
@@ -2478,6 +2478,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
@DsfServiceEventHandler
public void handleEvent(IExitedDMEvent event) {
+ if (fTargetContext == null) {
+ return;
+ }
final IExecutionDMContext context= event.getDMContext();
if (context.equals(fTargetContext)
|| DMContexts.isAncestorOf(fTargetContext, context)) {
@@ -2490,6 +2493,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
@DsfServiceEventHandler
public void handleEvent(ISuspendedDMEvent event) {
+ if (fTargetContext == null) {
+ return;
+ }
final IExecutionDMContext context= event.getDMContext();
if (context.equals(fTargetContext)
|| DMContexts.isAncestorOf(fTargetContext, context)) {
@@ -2504,6 +2510,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
@DsfServiceEventHandler
public void handleEvent(IResumedDMEvent event) {
+ if (fTargetContext == null) {
+ return;
+ }
final IExecutionDMContext context= event.getDMContext();
if (context.equals(fTargetContext)
|| DMContexts.isAncestorOf(fTargetContext, context)) {

Back to the top