PDBInformation

Struct PDBInformation 

Source
pub struct PDBInformation<'s> {
    pub version: HeaderVersion,
    pub signature: u32,
    pub age: u32,
    pub guid: Uuid,
    pub names_offset: usize,
    pub names_size: usize,
    /* private fields */
}
Expand description

A PDB info stream header parsed from a stream.

The PDB information stream contains the GUID and age fields that can be used to verify that a PDB file matches a specific binary, as well a list of named PDB streams with their stream indices.

Fields§

§version: HeaderVersion

The version of the PDB format in use.

§signature: u32

A 32-bit timestamp.

§age: u32

The number of times this PDB file has been written.

This number is bumped by the linker and other tools every time the PDB is modified. It does not necessarily correspond to the age declared in the image. Consider using DebugInformation::age for a better match.

This PDB matches an image, if the guid values match and the PDB age is equal or higher than the image’s age.

§guid: Uuid

A Uuid generated when this PDB file was created that should uniquely identify it.

§names_offset: usize

The offset of the start of the stream name data within the stream.

§names_size: usize

The size of the stream name data, in bytes.

Implementations§

Source§

impl<'s> PDBInformation<'s>

Source

pub fn stream_names(&self) -> Result<StreamNames<'_>>

Get a StreamNames object that can be used to iterate over named streams contained within the PDB file.

This can be used to look up certain PDB streams by name.

§Example
let file = std::fs::File::open("fixtures/self/foo.pdb")?;
let mut pdb = pdb::PDB::open(file)?;
let info = pdb.pdb_information()?;
let names = info.stream_names()?;
let mut v: Vec<_> = names.iter().map(|n| n.name.to_string()).collect();
v.sort();
assert_eq!(&v, &["mystream", "/LinkInfo", "/names", "/src/headerblock"]);

Trait Implementations§

Source§

impl<'s> Debug for PDBInformation<'s>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'s> Freeze for PDBInformation<'s>

§

impl<'s> !RefUnwindSafe for PDBInformation<'s>

§

impl<'s> !Send for PDBInformation<'s>

§

impl<'s> !Sync for PDBInformation<'s>

§

impl<'s> Unpin for PDBInformation<'s>

§

impl<'s> !UnwindSafe for PDBInformation<'s>

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.

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>,

Source§

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>,

Source§

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.