LLVM 22.0.0git
llvm::MinidumpYAML::Stream Struct Reference

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

#include "llvm/ObjectYAML/MinidumpYAML.h"

Inheritance diagram for llvm::MinidumpYAML::Stream:
[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()

◆ ~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 98 of file MinidumpYAML.cpp.

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

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 69 of file MinidumpYAML.cpp.

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

Referenced by create(), and create().

Member Data Documentation

◆ Kind

◆ Type


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