LLDB mainline
|
#include <TraceDumper.h>
Classes | |
class | TracedSegment |
class | UntracedPrefixSegment |
Public Member Functions | |
FunctionCall (const lldb::TraceCursorSP &cursor_sp, const SymbolInfo &symbol_info) | |
Create a new function call given an instruction. | |
void | AppendSegment (const lldb::TraceCursorSP &cursor_sp, const SymbolInfo &symbol_info) |
Append a new traced segment to this function call. | |
const SymbolInfo & | GetSymbolInfo () const |
bool | IsError () const |
const std::deque< TracedSegment > & | GetTracedSegments () const |
TracedSegment & | GetLastTracedSegment () |
void | SetUntracedPrefixSegment (FunctionCallUP &&nested_call) |
Create an untraced segment for this call that jumps to the provided nested call. | |
const std::optional< UntracedPrefixSegment > & | GetUntracedPrefixSegment () const |
FunctionCall * | GetParentCall () const |
void | SetParentCall (FunctionCall &parent_call) |
Private Attributes | |
std::optional< UntracedPrefixSegment > | m_untraced_prefix_segment |
An optional untraced segment that precedes all the traced segments. | |
std::deque< TracedSegment > | m_traced_segments |
The traced segments in order. | |
FunctionCall * | m_parent_call = nullptr |
The parent call, which might be null. | |
bool | m_is_error |
Whether this call represents a list of consecutive errors. | |
Definition at line 209 of file TraceDumper.h.
TraceDumper::FunctionCall::FunctionCall | ( | const lldb::TraceCursorSP & | cursor_sp, |
const SymbolInfo & | symbol_info | ||
) |
Create a new function call given an instruction.
This will also create a segment for that instruction.
[in] | cursor_sp | A cursor pointing to the first instruction of that function call. |
[in] | symbol_info | The symbol information of that first instruction. |
Definition at line 643 of file TraceDumper.cpp.
References AppendSegment(), and m_is_error.
void TraceDumper::FunctionCall::AppendSegment | ( | const lldb::TraceCursorSP & | cursor_sp, |
const SymbolInfo & | symbol_info | ||
) |
Append a new traced segment to this function call.
[in] | cursor_sp | A cursor pointing to the first instruction of the new segment. |
[in] | symbol_info | The symbol information of that first instruction. |
Definition at line 650 of file TraceDumper.cpp.
References m_traced_segments.
Referenced by AppendReturnedInstructionToFunctionCallForest(), and FunctionCall().
TraceDumper::FunctionCall::TracedSegment & TraceDumper::FunctionCall::GetLastTracedSegment | ( | ) |
Definition at line 669 of file TraceDumper.cpp.
References m_traced_segments.
Referenced by AppendErrorToFunctionCallForest(), and AppendInstructionToFunctionCallForest().
TraceDumper::FunctionCall * TraceDumper::FunctionCall::GetParentCall | ( | ) | const |
Definition at line 683 of file TraceDumper.cpp.
References m_parent_call.
Referenced by AppendReturnedInstructionToFunctionCallForest().
const TraceDumper::SymbolInfo & TraceDumper::FunctionCall::GetSymbolInfo | ( | ) | const |
Definition at line 657 of file TraceDumper.cpp.
References m_traced_segments.
Referenced by AppendReturnedInstructionToFunctionCallForest(), and OutputWriterCLI::DumpUntracedContext().
const std::deque< TraceDumper::FunctionCall::TracedSegment > & TraceDumper::FunctionCall::GetTracedSegments | ( | ) | const |
Definition at line 664 of file TraceDumper.cpp.
References m_traced_segments.
Referenced by OutputWriterCLI::DumpFunctionCallTree(), and OutputWriterJSON::DumpFunctionCallTree().
const std::optional< TraceDumper::FunctionCall::UntracedPrefixSegment > & TraceDumper::FunctionCall::GetUntracedPrefixSegment | ( | ) | const |
Definition at line 674 of file TraceDumper.cpp.
References m_untraced_prefix_segment.
Referenced by OutputWriterCLI::DumpFunctionCallTree(), and OutputWriterJSON::DumpFunctionCallTree().
bool TraceDumper::FunctionCall::IsError | ( | ) | const |
Definition at line 661 of file TraceDumper.cpp.
References m_is_error.
Referenced by AppendErrorToFunctionCallForest(), AppendInstructionToFunctionCallForest(), OutputWriterCLI::DumpSegmentContext(), and OutputWriterCLI::DumpUntracedContext().
void TraceDumper::FunctionCall::SetParentCall | ( | TraceDumper::FunctionCall & | parent_call | ) |
Definition at line 687 of file TraceDumper.cpp.
References m_parent_call.
void TraceDumper::FunctionCall::SetUntracedPrefixSegment | ( | TraceDumper::FunctionCallUP && | nested_call | ) |
Create an untraced segment for this call that jumps to the provided nested call.
Definition at line 678 of file TraceDumper.cpp.
References m_untraced_prefix_segment.
|
private |
Whether this call represents a list of consecutive errors.
Definition at line 373 of file TraceDumper.h.
Referenced by FunctionCall(), and IsError().
|
private |
The parent call, which might be null.
Useful for reconstructing callstacks.
Definition at line 371 of file TraceDumper.h.
Referenced by GetParentCall(), and SetParentCall().
|
private |
The traced segments in order.
We used a deque to prevent moving these objects when appending to the list, which would happen with vector.
Definition at line 368 of file TraceDumper.h.
Referenced by AppendSegment(), GetLastTracedSegment(), GetSymbolInfo(), and GetTracedSegments().
|
private |
An optional untraced segment that precedes all the traced segments.
Definition at line 365 of file TraceDumper.h.
Referenced by GetUntracedPrefixSegment(), and SetUntracedPrefixSegment().