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

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

#include <TraceInstructionDumper.h>

Collaboration diagram for lldb_private::TraceInstructionDumper:
Collaboration graph
[legend]

Public Member Functions

 TraceInstructionDumper (lldb::TraceCursorUP &&cursor_up, int initial_index=0, bool raw=false, bool show_tsc=false)
 Create a instruction dumper for the cursor. More...
 
void DumpInstructions (Stream &s, size_t count)
 Dump count instructions of the thread trace starting at the current cursor position. More...
 
void SetNoMoreData ()
 Indicate the dumper that no more data is available in the trace. More...
 
bool HasMoreData ()
 

Private Member Functions

bool TryMoveOneStep ()
 Move the cursor one step. More...
 

Private Attributes

lldb::TraceCursorUP m_cursor_up
 
int m_index
 
bool m_raw
 
bool m_show_tsc
 
bool m_no_more_data = false
 If true, all the instructions have been traversed. More...
 

Detailed Description

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

Definition at line 18 of file TraceInstructionDumper.h.

Constructor & Destructor Documentation

◆ TraceInstructionDumper()

TraceInstructionDumper::TraceInstructionDumper ( lldb::TraceCursorUP &&  cursor_up,
int  initial_index = 0,
bool  raw = false,
bool  show_tsc = false 
)

Create a instruction dumper for the cursor.

Parameters
[in]cursorThe cursor whose instructions will be dumped.
[in]initial_indexPresentation index to use for referring to the current instruction of the cursor. If the direction is forwards, the index will increase, and if the direction is backwards, the index will decrease.
[in]rawDump only instruction addresses without disassembly nor symbol information.
[in]show_tscFor each instruction, print the corresponding timestamp counter if available.

Definition at line 21 of file TraceInstructionDumper.cpp.

Member Function Documentation

◆ DumpInstructions()

void TraceInstructionDumper::DumpInstructions ( Stream s,
size_t  count 
)

◆ HasMoreData()

bool TraceInstructionDumper::HasMoreData ( )
Returns
true if there's still more data to traverse in the trace.

Definition at line 160 of file TraceInstructionDumper.cpp.

References m_no_more_data.

Referenced by DumpInstructions().

◆ SetNoMoreData()

void TraceInstructionDumper::SetNoMoreData ( )

Indicate the dumper that no more data is available in the trace.

Definition at line 158 of file TraceInstructionDumper.cpp.

References m_no_more_data.

Referenced by TryMoveOneStep().

◆ TryMoveOneStep()

bool TraceInstructionDumper::TryMoveOneStep ( )
private

Move the cursor one step.

Returns
true if the cursor moved.
Return true if the cursor could move one step.

Definition at line 29 of file TraceInstructionDumper.cpp.

References m_cursor_up, m_index, and SetNoMoreData().

Referenced by DumpInstructions().

Member Data Documentation

◆ m_cursor_up

lldb::TraceCursorUP lldb_private::TraceInstructionDumper::m_cursor_up
private

Definition at line 67 of file TraceInstructionDumper.h.

Referenced by DumpInstructions(), and TryMoveOneStep().

◆ m_index

int lldb_private::TraceInstructionDumper::m_index
private

Definition at line 68 of file TraceInstructionDumper.h.

Referenced by DumpInstructions(), and TryMoveOneStep().

◆ m_no_more_data

bool lldb_private::TraceInstructionDumper::m_no_more_data = false
private

If true, all the instructions have been traversed.

Definition at line 72 of file TraceInstructionDumper.h.

Referenced by HasMoreData(), and SetNoMoreData().

◆ m_raw

bool lldb_private::TraceInstructionDumper::m_raw
private

Definition at line 69 of file TraceInstructionDumper.h.

Referenced by DumpInstructions().

◆ m_show_tsc

bool lldb_private::TraceInstructionDumper::m_show_tsc
private

Definition at line 70 of file TraceInstructionDumper.h.

Referenced by DumpInstructions().


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