Struct symsrv::SymbolCache
source · pub struct SymbolCache { /* private fields */ }
Expand description
Obtains symbols according to the instructions in the symbol path.
Implementations§
source§impl SymbolCache
impl SymbolCache
sourcepub fn new(
symbol_path: Vec<NtSymbolPathEntry>,
default_downstream_store: Option<&Path>,
verbose: bool
) -> Self
pub fn new( symbol_path: Vec<NtSymbolPathEntry>, default_downstream_store: Option<&Path>, verbose: bool ) -> Self
Create a new SymbolCache
. If verbose
is set to true
, log messages
will be printed to stderr.
sourcepub async fn get_file(&self, path: &Path) -> Result<PathBuf, Error>
pub async fn get_file(&self, path: &Path) -> Result<PathBuf, Error>
This is the primary entry point to fetch symbols. It takes a relative
path
of the form name.pdb\HEX\name.pdb
, and then looks up the
file according to the recipe of this SymbolCache
. That means it searches
cache directories, downloads symbols as needed, and uncompresses files
as needed.
If a matching file is found, a PathBuf
to the uncompressed file on the local
file system is returned.
The path should be a relative path to a symbol file. The file can be a PDB file or a binary (exe / dll). The syntax of these paths is as follows:
- For PDBs:
<pdbName>\<GUID><age>\<pdbName>
, with<GUID>
in uppercase and<age>
in lowercase hex. Example:xul.pdb\B2A2B092E45739B84C4C44205044422E1\xul.pdb
- For binaries:
<peName>\<TIMESTAMP><imageSize>\<peName>
, with<TIMESTAMP>
printed as eight uppercase hex digits (with leading zeros added as needed) and<imageSize>
in lowercase hex digits with as many digits as needed. Example:renderdoc.dll\61015E74442b000\renderdoc.dll
Auto Trait Implementations§
impl RefUnwindSafe for SymbolCache
impl Send for SymbolCache
impl Sync for SymbolCache
impl Unpin for SymbolCache
impl UnwindSafe for SymbolCache
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more