LLVM  17.0.0git
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
Collaboration diagram for llvm::MinidumpYAML::Stream:
Collaboration graph

Public Types

enum  StreamKind {
  StreamKind::Exception, StreamKind::MemoryInfoList, 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


Definition at line 28 of file MinidumpYAML.h.

Constructor & Destructor Documentation

◆ Stream()

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

Definition at line 39 of file MinidumpYAML.h.

◆ ~Stream()

Stream::~Stream ( )

Member Function Documentation

◆ create() [1/2]

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

Create a stream from the given stream directory entry.

Definition at line 463 of file MinidumpYAML.cpp.

References M, move, llvm::Expected< T >::takeError(), llvm::dwarf::toStringRef(), and llvm::minidump::Directory::Type.

◆ create() [2/2]

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

Create an empty stream of the given Type.

Definition at line 97 of file MinidumpYAML.cpp.

References llvm_unreachable.

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

◆ getKind()

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

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

Definition at line 42 of file MinidumpYAML.h.

◆ Type

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

Definition at line 43 of file MinidumpYAML.h.

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