LLVM  10.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::MinidumpYAML::Stream Struct Reference

The base class for all minidump streams. More...

#include "llvm/ObjectYAML/MinidumpYAML.h"

Inheritance diagram for llvm::MinidumpYAML::Stream:
Inheritance graph
[legend]
Collaboration diagram for llvm::MinidumpYAML::Stream:
Collaboration graph
[legend]

Public Types

enum  StreamKind {
  StreamKind::MemoryList, StreamKind::ModuleList, StreamKind::RawContent, StreamKind::SystemInfo,
  StreamKind::TextContent, StreamKind::ThreadList
}
 

Public Member Functions

 Stream (StreamKind Kind, minidump::StreamType Type)
 
virtual ~Stream ()
 

Static Public Member Functions

static StreamKind getKind (minidump::StreamType Type)
 Get the stream Kind used for representing streams of a given Type. More...
 
static std::unique_ptr< Streamcreate (minidump::StreamType Type)
 Create an empty stream of the given Type. More...
 
static Expected< std::unique_ptr< Stream > > create (const minidump::Directory &StreamDesc, const object::MinidumpFile &File)
 Create a stream from the given stream directory entry. More...
 

Public Attributes

const StreamKind Kind
 
const minidump::StreamType Type
 

Detailed Description

The base class for all minidump streams.

The "Type" of the stream corresponds to the Stream Type field in the minidump file. The "Kind" field specifies how are we going to treat it. For highly specialized streams (e.g. SystemInfo), there is a 1:1 mapping between Types and Kinds, but in general one stream Kind can be used to represent multiple stream Types (e.g. any unrecognised stream Type will be handled via RawContentStream). The mapping from Types to Kinds is fixed and given by the static getKind function.

Definition at line 27 of file MinidumpYAML.h.

Member Enumeration Documentation

◆ StreamKind

Enumerator
MemoryList 
ModuleList 
RawContent 
SystemInfo 
TextContent 
ThreadList 

Definition at line 28 of file MinidumpYAML.h.

Constructor & Destructor Documentation

◆ Stream()

llvm::MinidumpYAML::Stream::Stream ( StreamKind  Kind,
minidump::StreamType  Type 
)
inline

◆ ~Stream()

Stream::~Stream ( )
virtualdefault

Referenced by mapOptionalHex(), and Stream().

Member Function Documentation

◆ create() [1/2]

std::unique_ptr< Stream > Stream::create ( minidump::StreamType  Type)
static

◆ create() [2/2]

Expected< std::unique_ptr< Stream > > Stream::create ( const minidump::Directory StreamDesc,
const object::MinidumpFile File 
)
static

◆ getKind()

Stream::StreamKind Stream::getKind ( minidump::StreamType  Type)
static

Get the stream Kind used for representing streams of a given Type.

Definition at line 70 of file MinidumpYAML.cpp.

Member Data Documentation

◆ Kind

const StreamKind llvm::MinidumpYAML::Stream::Kind

◆ Type

const minidump::StreamType llvm::MinidumpYAML::Stream::Type

Definition at line 41 of file MinidumpYAML.h.

Referenced by layout().


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