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

Function build_function

plugins/warp/src/lib.rs:47–66  ·  view source on GitHub ↗
(
    func: &BNFunction,
    llil: &LowLevelILFunction<A, M, NonSSA<RegularNonSSA>>,
)

Source from the content-addressed store, hash-verified

45}
46
47pub fn build_function<A: Architecture, M: FunctionMutability>(
48 func: &BNFunction,
49 llil: &LowLevelILFunction<A, M, NonSSA<RegularNonSSA>>,
50) -> Function {
51 let bn_fn_ty = func.function_type();
52 Function {
53 guid: cached_function_guid(func, llil),
54 symbol: from_bn_symbol(&func.symbol()),
55 ty: from_bn_type(&func.view(), &bn_fn_ty, MAX_CONFIDENCE),
56 constraints: FunctionConstraints {
57 // NOTE: Adding adjacent only works if analysis is complete.
58 // NOTE: We do not filter out adjacent functions here.
59 adjacent: cached_adjacency_constraints(func, |_| true),
60 call_sites: cached_call_site_constraints(func),
61 // TODO: Add caller sites (when adjacent and call sites are minimal)
62 // NOTE: Adding caller sites only works if analysis is complete.
63 caller_sites: Default::default(),
64 },
65 }
66}
67
68/// Basic blocks sorted from high to low.
69pub fn sorted_basic_blocks(func: &BNFunction) -> Vec<BNRef<BNBasicBlock<NativeBlock>>> {

Callers 3

function_benchmarkFunction · 0.85
actionMethod · 0.85
functionMethod · 0.85

Calls 8

cached_function_guidFunction · 0.85
from_bn_symbolFunction · 0.85
from_bn_typeFunction · 0.85
function_typeMethod · 0.80
symbolMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected