What happens to the function when it is matched. TODO: add user: bool TODO: Rename to markup_function or something.
(function: &Function, matched: &WarpFunction)
| 38 | // TODO: add user: bool |
| 39 | // TODO: Rename to markup_function or something. |
| 40 | pub fn on_matched_function(function: &Function, matched: &WarpFunction) { |
| 41 | let view = function.view(); |
| 42 | // TODO: Using user symbols here is problematic |
| 43 | // TODO: For one they queue up a bunch of main thread actions |
| 44 | // TODO: Secondly by queueing up those main thread actions if you attempt to save the file |
| 45 | // TODO: Before the undo actions are done completing |
| 46 | view.define_user_symbol(&to_bn_symbol_at_address( |
| 47 | &view, |
| 48 | &matched.symbol, |
| 49 | function.symbol().address(), |
| 50 | )); |
| 51 | function.set_user_type(&to_bn_type(&function.arch(), &matched.ty)); |
| 52 | // TODO: Add metadata. (both binja metadata and warp metadata) |
| 53 | function.add_tag( |
| 54 | &get_warp_tag_type(&view), |
| 55 | matched.guid.to_string(), |
| 56 | None, |
| 57 | true, |
| 58 | None, |
| 59 | ); |
| 60 | // Seems to be the only way to get the analysis update to work correctly. |
| 61 | function.mark_updates_required(FunctionUpdateType::FullAutoFunctionUpdate); |
| 62 | } |
| 63 | |
| 64 | struct DebugFunction; |
| 65 |
no test coverage detected