[−][src]Struct symbolic_debuginfo::pe::PeObject
Portable Executable, an extension of COFF used on Windows.
This file format is used to carry program code. Debug information is usually moved to a separate
container, PdbObject
. The PE file contains a reference to the PDB and vice versa to verify
that the files belong together.
While in rare instances, PE files might contain debug information, this case is not supported.
Implementations
impl<'data> PeObject<'data>
[src]
pub fn test(data: &[u8]) -> bool
[src]
Tests whether the buffer could contain an PE object.
pub fn parse(data: &'data [u8]) -> Result<Self, PeError>
[src]
Tries to parse a PE object from the given slice.
pub fn file_format(&self) -> FileFormat
[src]
The container file format, which is always FileFormat::Pe
.
pub fn code_id(&self) -> Option<CodeId>
[src]
The code identifier of this object.
The code identifier consists of the time_date_stamp
field id the COFF header, followed by
the size_of_image
field in the optional header. If the optional PE header is not present,
this identifier is None
.
pub fn debug_id(&self) -> DebugId
[src]
The debug information identifier of this PE.
Since debug information is stored in an external [PdbObject
], this identifier actually
refers to the PDB. While strictly the filename of the PDB would also be necessary fully
resolve it, in most instances the GUID and age contained in this identifier are sufficient.
pub fn debug_file_name(&self) -> Option<Cow<'_, str>>
[src]
The name of the referenced PDB file.
pub fn arch(&self) -> Arch
[src]
The CPU architecture of this object, as specified in the COFF header.
pub fn kind(&self) -> ObjectKind
[src]
The kind of this object, as specified in the PE header.
pub fn load_address(&self) -> u64
[src]
The address at which the image prefers to be loaded into memory.
ELF files store all internal addresses as if it was loaded at that address. When the image is actually loaded, that spot might already be taken by other images and so it must be relocated to a new address. During load time, the loader rewrites all addresses in the program code to match the new load address so that there is no runtime overhead when executing the code.
Addresses used in symbols
or debug_session
have already been rebased relative to that
load address, so that the caller only has to deal with addresses relative to the actual
start of the image.
pub fn has_symbols(&self) -> bool
[src]
Determines whether this object exposes a public symbol table.
pub fn symbols(&self) -> PeSymbolIterator<'data, '_>ⓘNotable traits for PeSymbolIterator<'data, 'object>
impl<'data, 'object> Iterator for PeSymbolIterator<'data, 'object> type Item = Symbol<'data>;
[src]
Notable traits for PeSymbolIterator<'data, 'object>
impl<'data, 'object> Iterator for PeSymbolIterator<'data, 'object> type Item = Symbol<'data>;
Returns an iterator over symbols in the public symbol table.
pub fn symbol_map(&self) -> SymbolMap<'data>
[src]
Returns an ordered map of symbols in the symbol table.
pub fn has_debug_info(&self) -> bool
[src]
Determines whether this object contains debug information.
This is always false
, as debug information is not supported for PE files.
pub fn has_sources(&self) -> bool
[src]
Determines whether this object contains embedded source.
pub fn debug_session(&self) -> Result<PeDebugSession<'data>, PeError>
[src]
Constructs a no-op debugging session.
pub fn has_unwind_info(&self) -> bool
[src]
Determines whether this object contains stack unwinding information.
pub fn data(&self) -> &'data [u8]
[src]
Returns the raw data of the PE file.
pub fn sections(&self) -> &[SectionTable]
[src]
A list of the sections in this PE binary, used to resolve virtual addresses.
pub fn exception_data(&self) -> Option<&ExceptionData<'_>>
[src]
Returns exception data containing unwind information.
Trait Implementations
impl<'slf, 'data: 'slf> AsSelf<'slf> for PeObject<'data>
[src]
type Ref = PeObject<'slf>
The Self
type with 'slf
lifetimes, returned by as_self
.
pub fn as_self(&'slf self) -> &Self::Ref
[src]
impl<'_> Debug for PeObject<'_>
[src]
impl<'data: 'object, 'object> ObjectLike<'data, 'object> for PeObject<'data>
[src]
type Error = PeError
Errors thrown when reading information from this object.
type Session = PeDebugSession<'data>
A session that allows optimized access to debugging information.
type SymbolIterator = PeSymbolIterator<'data, 'object>
The iterator over the symbols in the public symbol table.
pub fn file_format(&self) -> FileFormat
[src]
pub fn code_id(&self) -> Option<CodeId>
[src]
pub fn debug_id(&self) -> DebugId
[src]
pub fn arch(&self) -> Arch
[src]
pub fn kind(&self) -> ObjectKind
[src]
pub fn load_address(&self) -> u64
[src]
pub fn has_symbols(&self) -> bool
[src]
pub fn symbols(&'object self) -> Self::SymbolIterator
[src]
pub fn symbol_map(&self) -> SymbolMap<'data>
[src]
pub fn has_debug_info(&self) -> bool
[src]
pub fn debug_session(&self) -> Result<Self::Session, Self::Error>
[src]
pub fn has_unwind_info(&self) -> bool
[src]
pub fn has_sources(&self) -> bool
[src]
Auto Trait Implementations
impl<'data> RefUnwindSafe for PeObject<'data>
impl<'data> Send for PeObject<'data>
impl<'data> Sync for PeObject<'data>
impl<'data> Unpin for PeObject<'data>
impl<'data> UnwindSafe for PeObject<'data>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,