Trait samply_symbols::FileAndPathHelper
source · pub trait FileAndPathHelper<'h> {
type F: FileContents + 'static;
type FL: FileLocation + 'static;
type OpenFileFuture: OptionallySendFuture<Output = FileAndPathHelperResult<Self::F>> + 'h;
fn get_candidate_paths_for_debug_file(
&self,
info: &LibraryInfo
) -> FileAndPathHelperResult<Vec<CandidatePathInfo<Self::FL>>>;
fn get_candidate_paths_for_binary(
&self,
info: &LibraryInfo
) -> FileAndPathHelperResult<Vec<CandidatePathInfo<Self::FL>>>;
fn get_dyld_shared_cache_paths(
&self,
arch: Option<&str>
) -> FileAndPathHelperResult<Vec<Self::FL>>;
fn load_file(&'h self, location: Self::FL) -> Self::OpenFileFuture;
fn get_candidate_paths_for_gnu_debug_link_dest(
&self,
_debug_link_name: &str
) -> FileAndPathHelperResult<Vec<Self::FL>> { ... }
fn get_candidate_paths_for_supplementary_debug_file(
&self,
_original_file_path: &Self::FL,
_supplementary_file_path: &str,
_supplementary_file_build_id: &ElfBuildId
) -> FileAndPathHelperResult<Vec<Self::FL>> { ... }
}Expand description
This is the trait that consumers need to implement so that they can call
the main entry points of this crate. This crate contains no direct file
access - all access to the file system is via this trait, and its associated
trait FileContents.
Required Associated Types§
type F: FileContents + 'static
type FL: FileLocation + 'static
type OpenFileFuture: OptionallySendFuture<Output = FileAndPathHelperResult<Self::F>> + 'h
Required Methods§
sourcefn get_candidate_paths_for_debug_file(
&self,
info: &LibraryInfo
) -> FileAndPathHelperResult<Vec<CandidatePathInfo<Self::FL>>>
fn get_candidate_paths_for_debug_file(
&self,
info: &LibraryInfo
) -> FileAndPathHelperResult<Vec<CandidatePathInfo<Self::FL>>>
Given a “debug name” and a “breakpad ID”, return a list of file paths which may potentially have artifacts containing symbol data for the requested binary (executable or library).
The symbolication methods will try these paths one by one, calling
load_file for each until it succeeds and finds a file whose contents
match the breakpad ID. Any remaining paths are discarded.
Arguments
debug_name: On Windows, this is the filename of the associated PDB file of the executable / DLL, for example “firefox.pdb” or “xul.pdb”. On non-Windows, this is the filename of the binary, for example “firefox” or “XUL” or “libxul.so”.breakpad_id: A string of 33 hex digits, serving as a hash of the contents of the binary / library. On Windows, this is 32 digits “signature” plus one digit of “pdbAge”. On non-Windows, this is the binary’s UUID (ELF id or mach-o UUID) plus a “0” digit at the end (replacing the pdbAge).
sourcefn get_candidate_paths_for_binary(
&self,
info: &LibraryInfo
) -> FileAndPathHelperResult<Vec<CandidatePathInfo<Self::FL>>>
fn get_candidate_paths_for_binary(
&self,
info: &LibraryInfo
) -> FileAndPathHelperResult<Vec<CandidatePathInfo<Self::FL>>>
TODO
TODO
sourcefn load_file(&'h self, location: Self::FL) -> Self::OpenFileFuture
fn load_file(&'h self, location: Self::FL) -> Self::OpenFileFuture
This method is the entry point for file access during symbolication.
The implementer needs to return an object which implements the FileContents trait.
This method is asynchronous, but once it returns, the file data needs to be
available synchronously because the FileContents methods are synchronous.
If there is no file at the requested path, an error should be returned (or in any
other error case).
Provided Methods§
sourcefn get_candidate_paths_for_gnu_debug_link_dest(
&self,
_debug_link_name: &str
) -> FileAndPathHelperResult<Vec<Self::FL>>
fn get_candidate_paths_for_gnu_debug_link_dest(
&self,
_debug_link_name: &str
) -> FileAndPathHelperResult<Vec<Self::FL>>
TODO
sourcefn get_candidate_paths_for_supplementary_debug_file(
&self,
_original_file_path: &Self::FL,
_supplementary_file_path: &str,
_supplementary_file_build_id: &ElfBuildId
) -> FileAndPathHelperResult<Vec<Self::FL>>
fn get_candidate_paths_for_supplementary_debug_file(
&self,
_original_file_path: &Self::FL,
_supplementary_file_path: &str,
_supplementary_file_build_id: &ElfBuildId
) -> FileAndPathHelperResult<Vec<Self::FL>>
TODO