pub struct FunctionInterface<'str> {
pub name: Cow<'str, str>,
pub address: Option<u64>,
pub is_external: bool,
pub signature: Option<FunctionSignature>,
pub kind: FunctionKind,
pub effects: FunctionEffects,
pub import_ordinal: Option<u16>,
}Expand description
Everything a caller reasons about a function: its name, address, semantic kind, external-ness, and ABI/analysis signature. This is the caller-reasoning surface (ruling 1 of the context-split design): it is precisely the data a function pass may read about another function. Its counterpart is the function body (arenas, roster, users, local names) — everything only the function’s own passes touch.
Interfaces are stored in their own
Context::interfaces
registry, held in lockstep with the function bodies under the same
FunctionId and never checked out — so a caller always reads the real
interface even while a callee’s body is checked out to a worker.
Fields§
§name: Cow<'str, str>The function’s name.
address: Option<u64>Optional entry address (from binary).
is_external: boolWhether this is an external (imported) function.
External functions have no lifted body — they are stubs for calls that go outside the binary (e.g. PLT thunks for shared-library functions). The recursive disassembler will not attempt to lift their body.
signature: Option<FunctionSignature>Optional ABI description used by alias analysis.
kind: FunctionKindWhat semantic class this function belongs to.
effects: FunctionEffectsCall-graph-closed implicit effect summary of this function, per the
argpromote v2 design (ARGPROMOTE_REGISTERS_V2.md). Solved by the
effect-analysis pass and read by the materialize/regpure passes, the
emulator, alias analysis, and the verifier.
Serialized into the .harbinger wire shape so that rewritten regpure
call sites and materialized interfaces stay in sync with the snapshot.
Older snapshots that predate this field load as
RegisterChannelState::Unsolved via #[serde(default)].
import_ordinal: Option<u16>For a PE import brought in by ordinal only, the ordinal it was imported at. Recorded before the stub is renamed to its real export name.
Implementations§
Source§impl<'str> FunctionInterface<'str>
impl<'str> FunctionInterface<'str>
Sourcepub fn new(name: Cow<'str, str>) -> Self
pub fn new(name: Cow<'str, str>) -> Self
A fresh interface named name, with default (empty) signature/kind.
Sourcepub fn param_attr(&self, index: usize) -> Option<ParamAttrs>
pub fn param_attr(&self, index: usize) -> Option<ParamAttrs>
The inferred pointer attributes for positional argument index, or
None when this function has no analyzed attributes.
Trait Implementations§
Source§impl<'str> Clone for FunctionInterface<'str>
impl<'str> Clone for FunctionInterface<'str>
Source§fn clone(&self) -> FunctionInterface<'str>
fn clone(&self) -> FunctionInterface<'str>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more