| 943 | |
| 944 | |
| 945 | bool MachoView::IsValidFunctionStart(uint64_t addr) |
| 946 | { |
| 947 | uint8_t opcode[BN_MAX_INSTRUCTION_LENGTH]; |
| 948 | size_t opLen = Read(opcode, addr, m_arch->GetMaxInstructionLength()); |
| 949 | if (!opLen) |
| 950 | return false; |
| 951 | |
| 952 | Ref<LowLevelILFunction> ilFunc = new LowLevelILFunction(m_arch, nullptr); |
| 953 | ilFunc->SetCurrentAddress(m_arch, addr); |
| 954 | m_arch->GetInstructionLowLevelIL(opcode, addr, opLen, *ilFunc); |
| 955 | for (size_t i = 0; i < ilFunc->GetInstructionCount(); i++) |
| 956 | { |
| 957 | const auto& instr = ilFunc->GetInstruction(i); |
| 958 | if (instr.operation == LLIL_UNDEF) |
| 959 | return false; |
| 960 | } |
| 961 | |
| 962 | return true; |
| 963 | } |
| 964 | |
| 965 | |
| 966 | void MachoView::ParseFunctionStarts(Platform* platform, uint64_t textBase, function_starts_command functionStarts) |
nothing calls this directly
no test coverage detected