From 2524e2ce6be351d79477442a073e743946d1334a Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Thu, 8 May 2025 11:31:10 -0700 Subject: Detect calls that the Objective-C workflow has rewritten directly to an implementation These are detected by their function names having the characteristic `-[ClassName methodName:]` format. Calls to functions with this naming pattern that accept a selector as a second argument are assumed to be `objc_msgSend` calls that the Objective-C workflow rewrote. These calls are formatted identically to other `objc_msgSend` calls with the exception that the selector tokens reference the address of the call target rather than the selector string, so double-clicking on them takes you to the fixed destination of the rewritten call. --- lang/c/pseudoobjc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/c/pseudoobjc.h') diff --git a/lang/c/pseudoobjc.h b/lang/c/pseudoobjc.h index 4b87c7d7..9910c4b8 100644 --- a/lang/c/pseudoobjc.h +++ b/lang/c/pseudoobjc.h @@ -22,7 +22,7 @@ protected: BNOperatorPrecedence precedence, bool statement) override; private: - bool GetExpr_ObjCMsgSend(const BinaryNinja::HighLevelILInstruction& expr, + bool GetExpr_ObjCMsgSend(uint64_t msgSendAddress, bool isRewritten, const BinaryNinja::HighLevelILInstruction& expr, BinaryNinja::HighLevelILTokenEmitter& tokens, BinaryNinja::DisassemblySettings* settings, const std::vector& parameterExprs); bool GetExpr_GenericObjCRuntimeCall(uint64_t address, const BinaryNinja::HighLevelILInstruction& expr, -- cgit v1.3.1