LLDB mainline
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::TraceDumper Class Reference

Class used to dump the instructions of a TraceCursor using its current state and granularity. More...

#include <TraceDumper.h>

Classes

class  FunctionCall
 
class  OutputWriter
 Interface used to abstract away the format in which the instruction information will be dumped. More...
 
struct  SymbolInfo
 Helper struct that holds symbol, disassembly and address information of an instruction. More...
 
struct  TraceItem
 Helper struct that holds all the information we know about a trace item. More...
 

Public Types

using FunctionCallUP = std::unique_ptr< FunctionCall >
 

Public Member Functions

 TraceDumper (lldb::TraceCursorSP cursor_sp, Stream &s, const TraceDumperOptions &options)
 Create a instruction dumper for the cursor.
 
std::optional< lldb::user_id_tDumpInstructions (size_t count)
 Dump count instructions of the thread trace starting at the current cursor position.
 
void DumpFunctionCalls ()
 Dump all function calls forwards chronologically and hierarchically.
 

Private Member Functions

TraceItem CreatRawTraceItem ()
 Create a trace item for the current position without symbol information.
 

Private Attributes

lldb::TraceCursorSP m_cursor_sp
 
TraceDumperOptions m_options
 
std::unique_ptr< OutputWriterm_writer_up
 

Detailed Description

Class used to dump the instructions of a TraceCursor using its current state and granularity.

Definition at line 51 of file TraceDumper.h.

Member Typedef Documentation

◆ FunctionCallUP

Definition at line 207 of file TraceDumper.h.

Constructor & Destructor Documentation

◆ TraceDumper()

TraceDumper::TraceDumper ( lldb::TraceCursorSP  cursor_sp,
Stream s,
const TraceDumperOptions options 
)

Create a instruction dumper for the cursor.

Parameters
[in]cursorThe cursor whose instructions will be dumped.
[in]sThe stream where to dump the instructions to.
[in]optionsAdditional options for configuring the dumping.

Definition at line 441 of file TraceDumper.cpp.

References lldb::eTraceCursorSeekTypeBeginning, lldb::eTraceCursorSeekTypeCurrent, lldb::eTraceCursorSeekTypeEnd, lldb_private::TraceDumperOptions::forwards, lldb_private::TraceDumperOptions::id, m_cursor_sp, m_options, and lldb_private::TraceDumperOptions::skip.

Member Function Documentation

◆ CreatRawTraceItem()

TraceDumper::TraceItem TraceDumper::CreatRawTraceItem ( )
private

Create a trace item for the current position without symbol information.

Definition at line 461 of file TraceDumper.cpp.

References lldb_private::TraceDumper::TraceItem::id, m_cursor_sp, m_options, lldb_private::TraceDumperOptions::show_timestamps, and lldb_private::TraceDumper::TraceItem::timestamp.

Referenced by DumpInstructions().

◆ DumpFunctionCalls()

void TraceDumper::DumpFunctionCalls ( )

Dump all function calls forwards chronologically and hierarchically.

Definition at line 907 of file TraceDumper.cpp.

References CreateFunctionCallForest(), m_cursor_sp, and m_writer_up.

Referenced by CommandObjectTraceDumpFunctionCalls::DoExecute().

◆ DumpInstructions()

std::optional< lldb::user_id_t > TraceDumper::DumpInstructions ( size_t  count)

Member Data Documentation

◆ m_cursor_sp

lldb::TraceCursorSP lldb_private::TraceDumper::m_cursor_sp
private

Definition at line 427 of file TraceDumper.h.

Referenced by CreatRawTraceItem(), DumpFunctionCalls(), DumpInstructions(), and TraceDumper().

◆ m_options

TraceDumperOptions lldb_private::TraceDumper::m_options
private

Definition at line 428 of file TraceDumper.h.

Referenced by CreatRawTraceItem(), DumpInstructions(), and TraceDumper().

◆ m_writer_up

std::unique_ptr<OutputWriter> lldb_private::TraceDumper::m_writer_up
private

Definition at line 429 of file TraceDumper.h.

Referenced by DumpFunctionCalls(), and DumpInstructions().


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