summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2020-04-24 21:18:52 -0400
committerBrian Potchik <brian@vector35.com>2020-04-24 21:18:52 -0400
commit38fcbfcf6eac86e8191667d5cabc467f6ee48579 (patch)
tree20d6041131cc3120c0bc0641b7d0d8e00b912368 /examples
parente965b392285f8c3045ef3a14988ef9d0da4b565f (diff)
Add intermediate analysis mode.
Diffstat (limited to 'examples')
-rw-r--r--examples/triage/view.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/triage/view.cpp b/examples/triage/view.cpp
index ddd1d4ff..246e94f7 100644
--- a/examples/triage/view.cpp
+++ b/examples/triage/view.cpp
@@ -221,10 +221,12 @@ TriageViewType::TriageViewType(): ViewType("Triage", "Triage Summary")
int TriageViewType::getPriority(BinaryViewRef data, const QString&)
{
BinaryNinja::Ref<BinaryNinja::Settings> settings = BinaryNinja::Settings::Instance();
- bool full = settings->Get<std::string>("analysis.mode", data) == "full";
+ auto analysisMode = settings->Get<std::string>("analysis.mode", data);
+ bool full = analysisMode == "full";
+ bool intermediate = analysisMode == "intermediate";
bool alwaysPrefer = settings->Get<bool>("triage.preferSummaryView", data);
bool preferForRaw = settings->Get<bool>("triage.preferSummaryViewForRaw", data);
- if (data->IsExecutable() && (alwaysPrefer || !full))
+ if (data->IsExecutable() && (alwaysPrefer || (!full && !intermediate)))
return 100;
if (data->GetLength() > 0)
{