Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit 43df228

Browse files
committed
Log analysis results on completion
1 parent 6ac96c0 commit 43df228

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Plugin/InfoHandler.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ void InfoHandler::applyInfoToView(SharedAnalysisInfo info, BinaryViewRef bv)
156156
defineReference(bv, sr->address, sr->nameAddress);
157157
}
158158

159+
unsigned totalMethods = 0;
160+
159161
// Create data variables and symbols for the analyzed classes.
160162
for (const auto& ci : info->classes) {
161163
defineVariable(bv, ci.listPointer, taggedPointerType);
@@ -181,6 +183,8 @@ void InfoHandler::applyInfoToView(SharedAnalysisInfo info, BinaryViewRef bv)
181183

182184
// Create data variables for each method in the method list.
183185
for (const auto& mi : ci.methodList.methods) {
186+
++totalMethods;
187+
184188
defineVariable(bv, mi.address, methodType);
185189
defineSymbol(bv, mi.address, sanitizeSelector(mi.selector), "mt_");
186190
defineVariable(bv, mi.typeAddress, stringType(mi.type.size()));
@@ -200,4 +204,10 @@ void InfoHandler::applyInfoToView(SharedAnalysisInfo info, BinaryViewRef bv)
200204

201205
bv->CommitUndoActions();
202206
bv->UpdateAnalysis();
207+
208+
const auto log = BinaryNinja::LogRegistry::GetLogger("ObjectiveNinja");
209+
log->LogInfo("Structure analysis complete");
210+
log->LogInfo("Found %d classes, %d methods, %d selector references",
211+
info->classes.size(), totalMethods, info->selectorRefs.size());
212+
log->LogInfo("Found %d CFString instances", info->cfStrings.size());
203213
}

0 commit comments

Comments
 (0)