GT-2880 set thumb on mem; fix exception handling under thumb

This commit is contained in:
ghizard
2019-06-05 14:21:01 -04:00
parent 64c5f7bd24
commit 7f3dc05d70
2 changed files with 17 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ package ghidra.app.cmd.data;
import ghidra.app.cmd.disassemble.DisassembleCommand;
import ghidra.app.cmd.function.CreateFunctionCmd;
import ghidra.app.util.PseudoDisassembler;
import ghidra.app.util.datatype.microsoft.DataApplyOptions;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressOutOfBoundsException;
@@ -323,6 +324,8 @@ public class EHDataTypeUtilities {
public static boolean createFunctionIfNeeded(Program program, Address functionAddress) {
// If there isn't an instruction at the function address yet, then disassemble there.
Listing listing = program.getListing();
functionAddress =
PseudoDisassembler.getNormalizedDisassemblyAddress(program, functionAddress);
Instruction inst = listing.getInstructionAt(functionAddress);
if (inst == null) {
DisassembleCommand cmd = new DisassembleCommand(functionAddress, null, true);