Function object_contains_any_symbol_substring

Source
pub fn object_contains_any_symbol_substring<P, S>(
    path: P,
    substrings: &[S],
) -> bool
where P: AsRef<Path>, S: AsRef<str>,
Expand description

Check an object file’s symbols for any matching substrings. That is, if an object file contains a symbol named hello_world, it will be matched against a provided substrings of ["hello", "bar"].

Returns true if any of the symbols found in the object file at path contain a substring listed in substrings.

Panics if path is not a valid object file readable by the current user or if path cannot be parsed as a recognized object file.

§Platform-specific behavior

On Windows MSVC, the binary (e.g. main.exe) does not contain the symbols, but in the separate PDB file instead. Furthermore, you will need to use crate::llvm::llvm_pdbutil as object crate does not handle PDB files.