MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / cached_function_guid

Function cached_function_guid

plugins/warp/src/cache.rs:125–141  ·  view source on GitHub ↗
(
    function: &BNFunction,
    llil: &LowLevelILFunction<A, M, NonSSA<RegularNonSSA>>,
)

Source from the content-addressed store, hash-verified

123}
124
125pub fn cached_function_guid<A: Architecture, M: FunctionMutability>(
126 function: &BNFunction,
127 llil: &LowLevelILFunction<A, M, NonSSA<RegularNonSSA>>,
128) -> FunctionGUID {
129 let view = function.view();
130 let view_id = ViewID::from(view);
131 let guid_cache = GUID_CACHE.get_or_init(Default::default);
132 match guid_cache.get(&view_id) {
133 Some(cache) => cache.function_guid(function, llil),
134 None => {
135 let cache = GUIDCache::default();
136 let guid = cache.function_guid(function, llil);
137 guid_cache.insert(view_id, cache);
138 guid
139 }
140 }
141}
142
143pub fn try_cached_function_guid(function: &BNFunction) -> Option<FunctionGUID> {
144 let view = function.view();

Callers 4

build_functionFunction · 0.85
insta_signaturesFunction · 0.85
actionMethod · 0.85
insert_workflowFunction · 0.85

Calls 4

function_guidMethod · 0.80
viewMethod · 0.45
getMethod · 0.45
insertMethod · 0.45

Tested by 1

insta_signaturesFunction · 0.68