(&self, view: &BinaryView)
| 33 | |
| 34 | impl Command for RunMatcher { |
| 35 | fn action(&self, view: &BinaryView) { |
| 36 | let view = view.to_owned(); |
| 37 | // TODO: Check to see if the GUID cache is empty and ask the user if they want to regenerate the guids. |
| 38 | std::thread::spawn(move || { |
| 39 | let undo_id = view.file().begin_undo_actions(true); |
| 40 | let background_task = BackgroundTask::new("Matching on functions...", false); |
| 41 | let start = Instant::now(); |
| 42 | view.functions() |
| 43 | .iter() |
| 44 | .for_each(|function| cached_function_matcher(&function)); |
| 45 | log::info!("Function matching took {:?}", start.elapsed()); |
| 46 | background_task.finish(); |
| 47 | view.file().commit_undo_actions(undo_id); |
| 48 | // Now we want to trigger re-analysis. |
| 49 | view.update_analysis(); |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | fn valid(&self, _view: &BinaryView) -> bool { |
| 54 | true |
nothing calls this directly
no test coverage detected