pub enum SymbolPattern {
Exact(String),
Glob(String),
Regex(RegexWrapper),
Demangled(String),
}Expand description
Pattern types for matching symbol names.
Variants§
Exact(String)
Exact symbol name match (e.g. “malloc”).
Glob(String)
Glob pattern match (e.g. “pthread_*”, “sql_?uery”).
Regex(RegexWrapper)
Regex match (e.g. “/^sql_.*query/”).
Demangled(String)
Demangled name match – demangles each symbol and matches against this string.
Triggered by C++ :: separator (e.g. “MyClass::method”, “std::vector::push_back”).
Implementations§
Source§impl SymbolPattern
impl SymbolPattern
Sourcepub fn matches(&self, symbol_name: &str) -> bool
pub fn matches(&self, symbol_name: &str) -> bool
Test whether a raw (mangled) symbol name matches this pattern.
Sourcepub fn matches_demangled(&self, demangled_name: &str) -> bool
pub fn matches_demangled(&self, demangled_name: &str) -> bool
Test whether a demangled symbol name matches this pattern. For Demangled patterns, checks if the demangled name contains the query. For other patterns, delegates to normal matching against the demangled name.
Sourcepub fn is_exact(&self) -> bool
pub fn is_exact(&self) -> bool
Returns true if this is a single-match pattern (Exact), meaning it can potentially be resolved by Aya’s built-in symbol resolution without scanning all ELFs ourselves.
Sourcepub fn display_str(&self) -> &str
pub fn display_str(&self) -> &str
Return the pattern string for display purposes.
Trait Implementations§
Source§impl Clone for SymbolPattern
impl Clone for SymbolPattern
Source§fn clone(&self) -> SymbolPattern
fn clone(&self) -> SymbolPattern
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more