(&self, _view: &BinaryView, func: &Function)
| 8 | |
| 9 | impl FunctionCommand for CopyFunctionGUID { |
| 10 | fn action(&self, _view: &BinaryView, func: &Function) { |
| 11 | let Ok(llil) = func.low_level_il() else { |
| 12 | log::error!("Could not get low level il for copied function"); |
| 13 | return; |
| 14 | }; |
| 15 | let guid = cached_function_guid(func, &llil); |
| 16 | log::info!( |
| 17 | "Function GUID for {}... {}", |
| 18 | func.symbol().short_name().to_string(), |
| 19 | guid |
| 20 | ); |
| 21 | if let Ok(mut clipboard) = arboard::Clipboard::new() { |
| 22 | let _ = clipboard.set_text(guid.to_string()); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | fn valid(&self, _view: &BinaryView, _func: &Function) -> bool { |
| 27 | true |
nothing calls this directly
no test coverage detected