Ignore invalid instructions
This could be a bad idea, but it's unclear how to properly handle these cases. Resolves #55
This commit is contained in:
parent
b44aa78c49
commit
3289b2a3aa
|
@ -266,8 +266,13 @@ impl FunctionSlices {
|
|||
}
|
||||
}
|
||||
StepResult::Illegal => {
|
||||
log::debug!("Illegal instruction @ {:#010X}", ins_addr);
|
||||
Ok(ExecCbResult::End(false))
|
||||
if ins.code == 0 {
|
||||
log::debug!("Hit zeroed padding @ {:#010X}", ins_addr);
|
||||
Ok(ExecCbResult::End(false))
|
||||
} else {
|
||||
log::debug!("Illegal instruction @ {:#010X}", ins_addr);
|
||||
Ok(ExecCbResult::Continue)
|
||||
}
|
||||
}
|
||||
StepResult::Jump(target) => match target {
|
||||
BranchTarget::Unknown
|
||||
|
|
|
@ -348,12 +348,15 @@ impl Tracker {
|
|||
}
|
||||
Ok(ExecCbResult::Continue)
|
||||
}
|
||||
StepResult::Illegal => bail!(
|
||||
"Illegal instruction hit @ {:#010X} (function {:#010X}-{:#010X})",
|
||||
ins_addr,
|
||||
function_start,
|
||||
function_end
|
||||
),
|
||||
StepResult::Illegal => {
|
||||
log::debug!(
|
||||
"Illegal instruction hit @ {:#010X} (function {:#010X}-{:#010X})",
|
||||
ins_addr,
|
||||
function_start,
|
||||
function_end
|
||||
);
|
||||
Ok(ExecCbResult::Continue)
|
||||
}
|
||||
StepResult::Jump(target) => match target {
|
||||
BranchTarget::Unknown
|
||||
| BranchTarget::Return
|
||||
|
|
Loading…
Reference in New Issue