Merge remote-tracking branch 'origin/Ghidra_11.2'

This commit is contained in:
Ryan Kurtz 2024-09-17 06:20:13 -04:00
commit 8ffa9c24be

View File

@ -2964,8 +2964,13 @@ public class CodeManager implements ErrorHandler, ManagerDB {
if (flowType == null) {
flowType = RefType.INVALID;
}
// Only remove jump reference if the function flowtype says it has a fallthrough
// Removing the branch to next address if instruction has no fallthrough causes
// flow following issues, for example creating a function body.
boolean isFallthrough =
(flowType.isJump() && flowAddr.equals(inst.getMaxAddress().next()));
(flowType.isJump() && flowAddr.equals(inst.getMaxAddress().next())) &&
inst.hasFallthrough();
if (!isFallthrough) {
mnemonicPrimaryRef = addDefaultMemoryReferenceIfMissing(inst,
Reference.MNEMONIC, flowAddr, flowType, oldRefList, mnemonicPrimaryRef);