@@ -126,11 +126,12 @@ void Workflow::inlineMethodCalls(AnalysisContextRef ac)
126126 if (GlobalState::viewIsIgnored (bv))
127127 return ;
128128
129+ const auto log = BinaryNinja::LogRegistry::GetLogger (" ObjectiveNinja" );
130+
129131 // Ignore the view if it has an unsupported architecture.
130132 auto archName = arch->GetName ();
131133 if (archName != " aarch64" && archName != " x86_64" ) {
132- BinaryNinja::LogError (" Architecture '%s' not supported by Objective Ninja" ,
133- archName.c_str ());
134+ log->LogError (" Architecture '%s' is not supported" , archName.c_str ());
134135 GlobalState::addIgnoredView (bv);
135136 return ;
136137 }
@@ -153,7 +154,7 @@ void Workflow::inlineMethodCalls(AnalysisContextRef ac)
153154
154155 InfoHandler::applyInfoToView (info, bv);
155156 } catch (...) {
156- BinaryNinja:: LogError (" [Objective Ninja]: Error during analysis . Please report this bug!" );
157+ log-> LogError (" Analysis failed . Please report this bug!" );
157158 }
158159
159160 GlobalState::setFlag (bv, Flag::DidRunStructureAnalysis);
@@ -167,19 +168,19 @@ void Workflow::inlineMethodCalls(AnalysisContextRef ac)
167168 // repeatedly search for all the usable function addresses.
168169 const auto msgSendFunctions = findMsgSendFunctions (bv);
169170 if (msgSendFunctions.empty ()) {
170- BinaryNinja:: LogError (" Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found" );
171+ log-> LogError (" Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found" );
171172 GlobalState::addIgnoredView (bv);
172173 return ;
173174 }
174175
175176 const auto llil = ac->GetLowLevelILFunction ();
176177 if (!llil) {
177- BinaryNinja:: LogError (" Bad result from `ac->GetLowLevelILFunction()` " );
178+ log-> LogError (" (Workflow) Failed to get LLIL for 0x%llx " , func-> GetStart () );
178179 return ;
179180 }
180181 const auto ssa = llil->GetSSAForm ();
181182 if (!ssa) {
182- BinaryNinja:: LogError (" Bad result from `llil->GetSSAForm()` " );
183+ log-> LogError (" (Workflow) Failed to get LLIL SSA form for 0x%llx " , func-> GetStart () );
183184 return ;
184185 }
185186
0 commit comments