LLDB  mainline
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::repro::Serializer Class Reference

Serializes functions, their arguments and their return type to a stream. More...

#include <ReproducerInstrumentation.h>

Collaboration diagram for lldb_private::repro::Serializer:
Collaboration graph
[legend]

Public Member Functions

 Serializer (llvm::raw_ostream &stream=llvm::outs())
 
template<typename Head , typename... Tail>
void SerializeAll (const Head &head, const Tail &... tail)
 Recursively serialize all the given arguments. More...
 
void SerializeAll ()
 

Private Member Functions

template<typename T >
void Serialize (T *t)
 Serialize pointers. More...
 
template<typename T >
void Serialize (T &t)
 Serialize references. More...
 
void Serialize (const void *v)
 
void Serialize (void *v)
 
void Serialize (const char *t)
 
void Serialize (const char **t)
 

Private Attributes

llvm::raw_ostream & m_stream
 Serialization stream. More...
 
ObjectToIndex m_tracker
 Mapping of objects to indices. More...
 

Detailed Description

Serializes functions, their arguments and their return type to a stream.

Definition at line 606 of file ReproducerInstrumentation.h.

Constructor & Destructor Documentation

◆ Serializer()

lldb_private::repro::Serializer::Serializer ( llvm::raw_ostream &  stream = llvm::outs())
inline

Definition at line 608 of file ReproducerInstrumentation.h.

Member Function Documentation

◆ Serialize() [1/6]

void lldb_private::repro::Serializer::Serialize ( const char **  t)
inlineprivate

Definition at line 673 of file ReproducerInstrumentation.h.

References Serialize().

◆ Serialize() [2/6]

void lldb_private::repro::Serializer::Serialize ( const char *  t)
inlineprivate

Definition at line 660 of file ReproducerInstrumentation.h.

References m_stream, Serialize(), stringify_args(), and arm64_dwarf::x0.

◆ Serialize() [3/6]

void lldb_private::repro::Serializer::Serialize ( const void *  v)
inlineprivate

Definition at line 652 of file ReproducerInstrumentation.h.

◆ Serialize() [4/6]

template<typename T >
void lldb_private::repro::Serializer::Serialize ( T &  t)
inlineprivate

Serialize references.

We need to differentiate between references to fundamental types (in which case we serialize its value) and references to objects (in which case we serialize their index).

Definition at line 639 of file ReproducerInstrumentation.h.

References lldb_private::repro::ObjectToIndex::GetIndexForObject(), m_stream, m_tracker, Serialize(), and stringify_args().

◆ Serialize() [5/6]

template<typename T >
void lldb_private::repro::Serializer::Serialize ( T *  t)
inlineprivate

Serialize pointers.

We need to differentiate between pointers to fundamental types (in which case we serialize its value) and pointer to objects (in which case we serialize their index).

Definition at line 623 of file ReproducerInstrumentation.h.

References lldb_private::repro::ObjectToIndex::GetIndexForObject(), m_tracker, and stringify_args().

Referenced by Serialize(), and SerializeAll().

◆ Serialize() [6/6]

void lldb_private::repro::Serializer::Serialize ( void *  v)
inlineprivate

Definition at line 656 of file ReproducerInstrumentation.h.

◆ SerializeAll() [1/2]

void lldb_private::repro::Serializer::SerializeAll ( )
inline

Definition at line 617 of file ReproducerInstrumentation.h.

References m_stream.

Referenced by SerializeAll().

◆ SerializeAll() [2/2]

template<typename Head , typename... Tail>
void lldb_private::repro::Serializer::SerializeAll ( const Head &  head,
const Tail &...  tail 
)
inline

Recursively serialize all the given arguments.

Definition at line 612 of file ReproducerInstrumentation.h.

References Serialize(), and SerializeAll().

Referenced by lldb_private::repro::Recorder::Record(), and lldb_private::repro::Recorder::RecordResult().

Member Data Documentation

◆ m_stream

llvm::raw_ostream& lldb_private::repro::Serializer::m_stream
private

Serialization stream.

Definition at line 692 of file ReproducerInstrumentation.h.

Referenced by Serialize(), and SerializeAll().

◆ m_tracker

ObjectToIndex lldb_private::repro::Serializer::m_tracker
private

Mapping of objects to indices.

Definition at line 695 of file ReproducerInstrumentation.h.

Referenced by Serialize().


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