From 5d8952c340ee91d240a80275f6d993a621d76a6f Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 30 Oct 2024 17:58:32 -0400 Subject: WARP: Cleanup find from function guid command --- plugins/warp/src/plugin/find.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/warp/src/plugin') diff --git a/plugins/warp/src/plugin/find.rs b/plugins/warp/src/plugin/find.rs index 6d6c5bc1..3a14f7fb 100644 --- a/plugins/warp/src/plugin/find.rs +++ b/plugins/warp/src/plugin/find.rs @@ -27,11 +27,10 @@ impl Command for FindFunctionFromGUID { thread::spawn(move || { let background_task = binaryninja::backgroundtask::BackgroundTask::new( format!("Searching functions for GUID... {}", searched_guid), - true, + false, ) .unwrap(); - // TODO: While background_task has not finished. let matched = funcs .par_iter() .filter_map(|func| { @@ -43,8 +42,12 @@ impl Command for FindFunctionFromGUID { .filter(|(_func, guid)| guid.eq(&searched_guid)) .collect::>(); - for (func, _) in matched { - log::info!("Match found at function... 0x{:0x}", func.start()); + if matched.is_empty() { + log::info!("No matches found for GUID... {}", searched_guid); + } else { + for (func, _) in matched { + log::info!("Match found at function... 0x{:0x}", func.start()); + } } background_task.finish(); -- cgit v1.3.1