pub struct BreakpadObject<'data> { /* private fields */ }
Expand description
A Breakpad object file.
To process minidump crash reports without having to understand all sorts of native symbol formats, the Breakpad processor uses a text-based symbol file format. It comprises records describing the object file, functions and lines, public symbols, as well as unwind information for stackwalking.
The platform-specific symbol dumping tools parse the debugging information the compiler provides (whether as DWARF or STABS sections in an ELF file or as stand-alone PDB files), and write that information back out in the Breakpad symbol file format. This format is much simpler and less detailed than compiler debugging information, and values legibility over compactness.
The full documentation resides here.
Implementations§
Source§impl<'data> BreakpadObject<'data>
impl<'data> BreakpadObject<'data>
Sourcepub fn parse(data: &'data [u8]) -> Result<Self, BreakpadError>
pub fn parse(data: &'data [u8]) -> Result<Self, BreakpadError>
Tries to parse a Breakpad object from the given slice.
Sourcepub fn file_format(&self) -> FileFormat
pub fn file_format(&self) -> FileFormat
The container file format, which is always FileFormat::Breakpad
.
Sourcepub fn name(&self) -> &'data str
pub fn name(&self) -> &'data str
The debug file name of this object.
This is the name of the original debug file that was used to create the Breakpad file. On
Windows, this will have a .pdb
extension, on other platforms that name is likely
equivalent to the name of the code file (shared library or executable).
Sourcepub fn kind(&self) -> ObjectKind
pub fn kind(&self) -> ObjectKind
The kind of this object.
Sourcepub fn load_address(&self) -> u64
pub fn load_address(&self) -> u64
The address at which the image prefers to be loaded into memory.
When Breakpad symbols are written, all addresses are rebased relative to the load address. Since the original load address is not stored in the file, it is assumed as zero.
Sourcepub fn has_symbols(&self) -> bool
pub fn has_symbols(&self) -> bool
Determines whether this object exposes a public symbol table.
Sourcepub fn symbols(&self) -> BreakpadSymbolIterator<'data> ⓘ
pub fn symbols(&self) -> BreakpadSymbolIterator<'data> ⓘ
Returns an iterator over symbols in the public symbol table.
Sourcepub fn symbol_map(&self) -> SymbolMap<'data>
pub fn symbol_map(&self) -> SymbolMap<'data>
Returns an ordered map of symbols in the symbol table.
Sourcepub fn has_debug_info(&self) -> bool
pub fn has_debug_info(&self) -> bool
Determines whether this object contains debug information.
Sourcepub fn debug_session(
&self,
) -> Result<BreakpadDebugSession<'data>, BreakpadError>
pub fn debug_session( &self, ) -> Result<BreakpadDebugSession<'data>, BreakpadError>
Constructs a debugging session.
A debugging session loads certain information from the object file and creates caches for efficient access to various records in the debug information. Since this can be quite a costly process, try to reuse the debugging session as long as possible.
Constructing this session will also work if the object does not contain debugging
information, in which case the session will be a no-op. This can be checked via
has_debug_info
.
Sourcepub fn has_unwind_info(&self) -> bool
pub fn has_unwind_info(&self) -> bool
Determines whether this object contains stack unwinding information.
Sourcepub fn has_sources(&self) -> bool
pub fn has_sources(&self) -> bool
Determines whether this object contains embedded source.
Sourcepub fn is_malformed(&self) -> bool
pub fn is_malformed(&self) -> bool
Determines whether this object is malformed and was only partially parsed
Sourcepub fn info_records(&self) -> BreakpadInfoRecords<'data> ⓘ
pub fn info_records(&self) -> BreakpadInfoRecords<'data> ⓘ
Returns an iterator over info records.
Sourcepub fn file_records(&self) -> BreakpadFileRecords<'data> ⓘ
pub fn file_records(&self) -> BreakpadFileRecords<'data> ⓘ
Returns an iterator over file records.
Sourcepub fn file_map(&self) -> BreakpadFileMap<'data>
pub fn file_map(&self) -> BreakpadFileMap<'data>
Returns a map for file name lookups by id.
Sourcepub fn public_records(&self) -> BreakpadPublicRecords<'data> ⓘ
pub fn public_records(&self) -> BreakpadPublicRecords<'data> ⓘ
Returns an iterator over public symbol records.
Sourcepub fn func_records(&self) -> BreakpadFuncRecords<'data> ⓘ
pub fn func_records(&self) -> BreakpadFuncRecords<'data> ⓘ
Returns an iterator over function records.
Sourcepub fn stack_records(&self) -> BreakpadStackRecords<'data> ⓘ
pub fn stack_records(&self) -> BreakpadStackRecords<'data> ⓘ
Returns an iterator over stack frame records.