LLVM 20.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
[legend]

Public Types

enum class  StreamKind {
  Exception , MemoryInfoList , MemoryList , Memory64List ,
  ModuleList , RawContent , SystemInfo , TextContent ,
  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.
 
static std::unique_ptr< Streamcreate (minidump::StreamType Type)
 Create an empty stream of the given Type.
 
static Expected< std::unique_ptr< Stream > > create (const minidump::Directory &StreamDesc, const object::MinidumpFile &File)
 Create a stream from the given stream directory entry.
 

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
Exception 
MemoryInfoList 
MemoryList 
Memory64List 
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

Definition at line 40 of file MinidumpYAML.h.

◆ ~Stream()

Stream::~Stream ( )
virtualdefault

Member Function Documentation

◆ create() [1/2]

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

◆ create() [2/2]

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

Create an empty stream of the given Type.

Definition at line 99 of file MinidumpYAML.cpp.

References Exception, getKind(), Kind, llvm_unreachable, Memory64List, MemoryInfoList, MemoryList, ModuleList, RawContent, SystemInfo, TextContent, and ThreadList.

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

◆ 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.

References Exception, Memory64List, MemoryInfoList, MemoryList, ModuleList, RawContent, SystemInfo, TextContent, and ThreadList.

Referenced by create().

Member Data Documentation

◆ Kind

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

◆ Type

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

Definition at line 44 of file MinidumpYAML.h.

Referenced by layout().


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