LLDB mainline
|
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_t > | DumpInstructions (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< OutputWriter > | m_writer_up |
Class used to dump the instructions of a TraceCursor using its current state and granularity.
Definition at line 51 of file TraceDumper.h.
using lldb_private::TraceDumper::FunctionCallUP = std::unique_ptr<FunctionCall> |
Definition at line 207 of file TraceDumper.h.
TraceDumper::TraceDumper | ( | lldb::TraceCursorSP | cursor_sp, |
Stream & | s, | ||
const TraceDumperOptions & | options | ||
) |
Create a instruction dumper for the cursor.
[in] | cursor | The cursor whose instructions will be dumped. |
[in] | s | The stream where to dump the instructions to. |
[in] | options | Additional 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.
|
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().
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().
std::optional< lldb::user_id_t > TraceDumper::DumpInstructions | ( | size_t | count | ) |
Dump count instructions of the thread trace starting at the current cursor position.
This effectively moves the cursor to the next unvisited position, so that a subsequent call to this method continues where it left off.
[in] | count | The number of instructions to print. |
Definition at line 536 of file TraceDumper.cpp.
References CalculateSymbolInfo(), lldb_private::TraceDumper::TraceItem::cpu_id, CreatRawTraceItem(), lldb_private::TraceDumper::TraceItem::error, lldb::eTraceEventCPUChanged, lldb::eTraceEventDisabledHW, lldb::eTraceEventDisabledSW, lldb::eTraceEventHWClockTick, lldb::eTraceEventSyncPoint, lldb_private::TraceDumper::TraceItem::event, lldb_private::TraceDumper::TraceItem::hw_clock, lldb_private::TraceDumper::TraceItem::load_address, m_cursor_sp, m_options, m_writer_up, lldb_private::TraceDumperOptions::only_events, lldb_private::TraceDumper::TraceItem::prev_symbol_info, lldb_private::TraceDumperOptions::raw, lldb_private::TraceDumperOptions::show_events, lldb_private::TraceDumper::TraceItem::symbol_info, and lldb_private::TraceDumper::TraceItem::sync_point_metadata.
Referenced by CommandObjectTraceDumpInstructions::DoExecute().
|
private |
Definition at line 427 of file TraceDumper.h.
Referenced by CreatRawTraceItem(), DumpFunctionCalls(), DumpInstructions(), and TraceDumper().
|
private |
Definition at line 428 of file TraceDumper.h.
Referenced by CreatRawTraceItem(), DumpInstructions(), and TraceDumper().
|
private |
Definition at line 429 of file TraceDumper.h.
Referenced by DumpFunctionCalls(), and DumpInstructions().