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

source

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.

source

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§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more