mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 20:22:44 +00:00
GP-0 Correct EmulatorHelper error handling for NullPointerException
(Closes #3139)
This commit is contained in:
parent
c9650f831c
commit
a5ae2cc04e
@ -511,6 +511,9 @@ public class EmulatorHelper implements MemoryFaultHandler, EmulatorConfiguration
|
||||
catch (Throwable t) {
|
||||
// TODO: need to enumerate errors better !!
|
||||
lastError = t.getMessage();
|
||||
if (lastError == null) {
|
||||
lastError = t.toString();
|
||||
}
|
||||
emulator.setHalt(true); // force execution to stop
|
||||
if (t instanceof CancelledException) {
|
||||
throw (CancelledException) t;
|
||||
|
@ -377,6 +377,9 @@ public class Emulate {
|
||||
/// completes.
|
||||
public void executeInstruction(boolean stopAtBreakpoint, TaskMonitor monitor)
|
||||
throws CancelledException, LowlevelError, InstructionDecodeException {
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
if (executionState == EmulateExecutionState.STOPPED) {
|
||||
if (last_execute_address == null && instructionStateModifier != null) {
|
||||
instructionStateModifier.initialExecuteCallback(this, current_address,
|
||||
|
Loading…
Reference in New Issue
Block a user