LLVM  10.0.0svn
llvm::object::MinidumpFile Class Reference

A class providing access to the contents of a minidump file. More...

#include "llvm/Object/Minidump.h"

Inheritance diagram for llvm::object::MinidumpFile:
[legend]
Collaboration diagram for llvm::object::MinidumpFile:
[legend]

## Classes

class  MemoryInfoIterator

## Public Member Functions

Returns the contents of the minidump header. More...

ArrayRef< minidump::Directorystreams () const
Returns the list of streams (stream directory entries) in this file. More...

ArrayRef< uint8_t > getRawStream (const minidump::Directory &Stream) const
Returns the raw contents of the stream given by the directory entry. More...

Optional< ArrayRef< uint8_t > > getRawStream (minidump::StreamType Type) const
Returns the raw contents of the stream of the given type, or None if the file does not contain a stream of this type. More...

Expected< ArrayRef< uint8_t > > getRawData (minidump::LocationDescriptor Desc) const
Returns the raw contents of an object given by the LocationDescriptor. More...

Expected< std::string > getString (size_t Offset) const
Returns the minidump string at the given offset. More...

Expected< const minidump::SystemInfo & > getSystemInfo () const
Returns the contents of the SystemInfo stream, cast to the appropriate type. More...

Expected< ArrayRef< minidump::Module > > getModuleList () const
Returns the module list embedded in the ModuleList stream. More...

Expected< const minidump::ExceptionStream & > getExceptionStream () const
Returns the contents of the Exception stream. More...

Expected< ArrayRef< minidump::MemoryDescriptor > > getMemoryList () const
Returns the list of descriptors embedded in the MemoryList stream. More...

Expected< iterator_range< MemoryInfoIterator > > getMemoryInfoList () const
Returns the list of descriptors embedded in the MemoryInfoList stream. More...

Public Member Functions inherited from llvm::object::Binary
Binary ()=delete

Binary (const Binary &other)=delete

virtual ~Binary ()

StringRef getData () const

StringRef getFileName () const

MemoryBufferRef getMemoryBufferRef () const

unsigned int getType () const

bool isObject () const

bool isSymbolic () const

bool isArchive () const

bool isMachOUniversalBinary () const

bool isTapiUniversal () const

bool isELF () const

bool isMachO () const

bool isCOFF () const

bool isXCOFF () const

bool isWasm () const

bool isCOFFImportFile () const

bool isIR () const

bool isMinidump () const

bool isTapiFile () const

bool isLittleEndian () const

bool isWinRes () const

Triple::ObjectFormatType getTripleObjectFormat () const

## Static Public Member Functions

static Expected< std::unique_ptr< MinidumpFile > > create (MemoryBufferRef Source)
Construct a new MinidumpFile object from the given memory buffer. More...

static bool classof (const Binary *B)

Static Public Member Functions inherited from llvm::object::Binary
static std::error_code checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)

Protected Types inherited from llvm::object::Binary
enum  {
ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR,
ID_TapiUniversal, ID_TapiFile, ID_Minidump, ID_WinRes,
ID_StartObjects, ID_COFF, ID_XCOFF32, ID_XCOFF64,
ID_ELF32L, ID_ELF32B, ID_ELF64L, ID_ELF64B,
ID_MachO32L, ID_MachO32B, ID_MachO64L, ID_MachO64B,
ID_Wasm, ID_EndObjects
}

Protected Member Functions inherited from llvm::object::Binary
Binary (unsigned int Type, MemoryBufferRef Source)

Static Protected Member Functions inherited from llvm::object::Binary
static unsigned int getELFType (bool isLE, bool is64Bits)

static unsigned int getMachOType (bool isLE, bool is64Bits)

Protected Attributes inherited from llvm::object::Binary
MemoryBufferRef Data

## Detailed Description

Definition at line 23 of file Minidump.h.

## ◆ classof()

 static bool llvm::object::MinidumpFile::classof ( const Binary * B )
inlinestatic

Definition at line 30 of file Minidump.h.

References llvm::object::Binary::isMinidump().

## ◆ create()

 Expected< std::unique_ptr< MinidumpFile > > MinidumpFile::create ( MemoryBufferRef Source )
static

Construct a new MinidumpFile object from the given memory buffer.

Returns an error if this file cannot be identified as a minidump file, or if its contents are badly corrupted (i.e. we cannot read the stream directory).

Definition at line 111 of file Minidump.cpp.

Referenced by llvm::object::createBinary().

## ◆ getExceptionStream()

 Expected llvm::object::MinidumpFile::getExceptionStream ( ) const
inline

Returns the contents of the Exception stream.

An error is returned if the file does not contain this stream, or the stream is smaller than the size of the ExceptionStream structure. The internal consistency of the stream is not checked in any way.

Definition at line 88 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Stream::create().

## ◆ getMemoryInfoList()

 Expected< iterator_range< MinidumpFile::MemoryInfoIterator > > MinidumpFile::getMemoryInfoList ( ) const

Returns the list of descriptors embedded in the MemoryInfoList stream.

The descriptors provide properties (e.g. permissions) of interesting regions of memory at the time the minidump was taken. An error is returned if the file does not contain this stream, or if the stream is not large enough to contain the number of memory descriptors declared in the stream header. The consistency of the MemoryInfoList entries themselves is not checked in any way.

Definition at line 57 of file Minidump.cpp.

## ◆ getMemoryList()

 Expected > llvm::object::MinidumpFile::getMemoryList ( ) const
inline

Returns the list of descriptors embedded in the MemoryList stream.

The descriptors provide the content of interesting regions of memory at the time the minidump was taken. An error is returned if the file does not contain this stream, or if the stream is not large enough to contain the number of memory descriptors declared in the stream header. The consistency of the MemoryDescriptor entries themselves is not checked in any way.

Definition at line 100 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Stream::create().

## ◆ getModuleList()

 Expected > llvm::object::MinidumpFile::getModuleList ( ) const
inline

Returns the module list embedded in the ModuleList stream.

An error is returned if the file does not contain this stream, or if the stream is not large enough to contain the number of modules declared in the stream header. The consistency of the Module entries themselves is not checked in any way.

Definition at line 71 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Stream::create().

## ◆ getRawData()

 Expected > llvm::object::MinidumpFile::getRawData ( minidump::LocationDescriptor Desc ) const
inline

Returns the raw contents of an object given by the LocationDescriptor.

An error is returned if the descriptor points outside of the minidump file.

Definition at line 50 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Stream::create().

## ◆ getRawStream() [1/2]

 ArrayRef llvm::object::MinidumpFile::getRawStream ( const minidump::Directory & Stream ) const
inline

Returns the raw contents of the stream given by the directory entry.

Definition at line 39 of file Minidump.h.

## ◆ getRawStream() [2/2]

 Optional< ArrayRef< uint8_t > > MinidumpFile::getRawStream ( minidump::StreamType Type ) const

Returns the raw contents of the stream of the given type, or None if the file does not contain a stream of this type.

Definition at line 18 of file Minidump.cpp.

References llvm::None.

## ◆ getString()

 Expected< std::string > MinidumpFile::getString ( size_t Offset ) const

Returns the minidump string at the given offset.

An error is returned if we fail to parse the string, or the string is invalid UTF16.

Definition at line 25 of file Minidump.cpp.

Referenced by llvm::MinidumpYAML::Stream::create(), and getRawData().

## ◆ getSystemInfo()

 Expected llvm::object::MinidumpFile::getSystemInfo ( ) const
inline

Returns the contents of the SystemInfo stream, cast to the appropriate type.

An error is returned if the file does not contain this stream, or the stream is smaller than the size of the SystemInfo structure. The internal consistency of the stream is not checked in any way.

Definition at line 62 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Stream::create().

 Expected > llvm::object::MinidumpFile::getThreadList ( ) const
inline

An error is returned if the file does not contain this stream, or if the stream is not large enough to contain the number of threads declared in the stream header. The consistency of the Thread entries themselves is not checked in any way.

Definition at line 80 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Stream::create().

inline

Returns the contents of the minidump header.

Definition at line 33 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Object::create().

## ◆ streams()

 ArrayRef llvm::object::MinidumpFile::streams ( ) const
inline

Returns the list of streams (stream directory entries) in this file.

Definition at line 36 of file Minidump.h.

Referenced by llvm::MinidumpYAML::Object::create().

The documentation for this class was generated from the following files: