diff options
| author | Mason Reed <mason@vector35.com> | 2025-07-20 20:42:01 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-07-21 12:14:45 -0400 |
| commit | 6ebadb16f3c5664a8d69376383232b79690e50d0 (patch) | |
| tree | e38c878ece68ca0ded20e04a9292da17330fb741 /plugins | |
| parent | 889220635ade554600346a576fe60de0a40b3b07 (diff) | |
[WARP] Add warning if trying to run matcher on database with no function guids generated
Just a sanity check so we can alert the user, they can just reanalyze their functions and the guid will be constructed
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/warp/src/plugin/workflow.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/warp/src/plugin/workflow.rs b/plugins/warp/src/plugin/workflow.rs index 04e14a16..878f8e94 100644 --- a/plugins/warp/src/plugin/workflow.rs +++ b/plugins/warp/src/plugin/workflow.rs @@ -105,6 +105,15 @@ pub fn run_matcher(view: &BinaryView) { }) .into_group_map(); + if functions_by_target_and_guid.is_empty() && !view.functions().is_empty() { + // The user is likely trying to run the matcher on a database before guids were automatically + // generated, we should alert them and ask if they would like to reanalyze. + // TODO: Call reanalyze for them? + log::error!("Trying to match with an older database, please reanalyze the database."); + background_task.finish(); + return; + } + // TODO: Par iter this? Using dashmap let guids_by_target: HashMap<Target, Vec<FunctionGUID>> = functions_by_target_and_guid .keys() |
