mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 09:55:29 +02:00
Bug 317226: Disassembly view throws NPE when debugging with CDI. Fix also NPE when getting frame address
This commit is contained in:
parent
931bdcb29a
commit
bb9485981f
1 changed files with 7 additions and 1 deletions
|
@ -14,6 +14,7 @@ package org.eclipse.cdt.debug.internal.ui.disassembly.dsf;
|
|||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.eclipse.cdt.core.IAddress;
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
|
||||
|
@ -99,7 +100,12 @@ public class CDIDisassemblyRetrieval implements IDisassemblyRetrieval {
|
|||
Runnable op= new Runnable() {
|
||||
public void run() {
|
||||
if (stackFrame instanceof ICStackFrame) {
|
||||
addressRequest.setAddress(((ICStackFrame)stackFrame).getAddress().getValue());
|
||||
IAddress address = ((ICStackFrame)stackFrame).getAddress();
|
||||
if (address != null ) {
|
||||
addressRequest.setAddress(address.getValue());
|
||||
} else {
|
||||
addressRequest.setStatus(new Status(IStatus.ERROR, CDebugUIPlugin.getUniqueIdentifier(), "Internal error: Cannot retrieve frame address")); //$NON-NLS-1$
|
||||
}
|
||||
} else {
|
||||
addressRequest.cancel();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue