Flutter Engine
The Flutter Engine
|
#include <SkSLDebugTracePlayer.h>
Classes | |
struct | VariableData |
Public Types | |
using | BreakpointSet = std::unordered_set< int > |
using | LineNumberMap = std::unordered_map< int, int > |
Public Member Functions | |
void | reset (sk_sp< DebugTracePriv > trace) |
void | step () |
void | stepOver () |
void | stepOut () |
void | run () |
void | setBreakpoints (std::unordered_set< int > breakpointLines) |
void | addBreakpoint (int line) |
void | removeBreakpoint (int line) |
const BreakpointSet & | getBreakpoints () |
bool | traceHasCompleted () const |
bool | atBreakpoint () const |
size_t | cursor () |
int32_t | getCurrentLine () const |
int32_t | getCurrentLineInStackFrame (int stackFrameIndex) const |
std::vector< int > | getCallStack () const |
int | getStackDepth () const |
const LineNumberMap & | getLineNumbersReached () const |
std::vector< VariableData > | getLocalVariables (int stackFrameIndex) const |
std::vector< VariableData > | getGlobalVariables () const |
Plays back a SkSL debug trace, allowing its contents to be viewed like a traditional debugger.
Definition at line 28 of file SkSLDebugTracePlayer.h.
using SkSL::SkSLDebugTracePlayer::BreakpointSet = std::unordered_set<int> |
Definition at line 55 of file SkSLDebugTracePlayer.h.
using SkSL::SkSLDebugTracePlayer::LineNumberMap = std::unordered_map<int, int> |
Returns every line number reached inside this debug trace, along with the remaining number of times that this trace will reach it. e.g. {100, 2} means line 100 will be reached twice.
Definition at line 83 of file SkSLDebugTracePlayer.h.
void SkSL::SkSLDebugTracePlayer::addBreakpoint | ( | int | line | ) |
Definition at line 131 of file SkSLDebugTracePlayer.cpp.
bool SkSL::SkSLDebugTracePlayer::atBreakpoint | ( | ) | const |
Returns true if there is a breakpoint set at the current line.
Definition at line 123 of file SkSLDebugTracePlayer.cpp.
|
inline |
Retrieves the cursor position.
Definition at line 65 of file SkSLDebugTracePlayer.h.
|
inline |
Definition at line 56 of file SkSLDebugTracePlayer.h.
std::vector< int > SkSL::SkSLDebugTracePlayer::getCallStack | ( | ) | const |
Returns the call stack as an array of FunctionInfo indices.
Definition at line 139 of file SkSLDebugTracePlayer.cpp.
int32_t SkSL::SkSLDebugTracePlayer::getCurrentLine | ( | ) | const |
Retrieves the current line.
Definition at line 109 of file SkSLDebugTracePlayer.cpp.
int32_t SkSL::SkSLDebugTracePlayer::getCurrentLineInStackFrame | ( | int | stackFrameIndex | ) | const |
Retrieves the current line for a given stack frame.
Definition at line 114 of file SkSLDebugTracePlayer.cpp.
std::vector< SkSLDebugTracePlayer::VariableData > SkSL::SkSLDebugTracePlayer::getGlobalVariables | ( | ) | const |
Definition at line 182 of file SkSLDebugTracePlayer.cpp.
|
inline |
Definition at line 84 of file SkSLDebugTracePlayer.h.
std::vector< SkSLDebugTracePlayer::VariableData > SkSL::SkSLDebugTracePlayer::getLocalVariables | ( | int | stackFrameIndex | ) | const |
Definition at line 170 of file SkSLDebugTracePlayer.cpp.
int SkSL::SkSLDebugTracePlayer::getStackDepth | ( | ) | const |
Returns the size of the call stack.
Definition at line 149 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::removeBreakpoint | ( | int | line | ) |
Definition at line 135 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::reset | ( | sk_sp< DebugTracePriv > | trace | ) |
Resets playback to the start of the trace. Breakpoints are not cleared.
Definition at line 18 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::run | ( | ) |
Advances the simulation until we hit a breakpoint, or the trace completes.
Definition at line 84 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::setBreakpoints | ( | std::unordered_set< int > | breakpointLines | ) |
Breakpoints will force the simulation to stop whenever a desired line is reached.
Definition at line 127 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::step | ( | ) |
Advances the simulation to the next Line op.
Definition at line 49 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::stepOut | ( | ) |
Advances the simulation until we exit from the current stack frame. Breakpoints will also stop the simulation even if we haven't left the stack frame.
Definition at line 71 of file SkSLDebugTracePlayer.cpp.
void SkSL::SkSLDebugTracePlayer::stepOver | ( | ) |
Advances the simulation to the next Line op, skipping past matched Enter/Exit pairs. Breakpoints will also stop the simulation even if we haven't reached an Exit.
Definition at line 58 of file SkSLDebugTracePlayer.cpp.
bool SkSL::SkSLDebugTracePlayer::traceHasCompleted | ( | ) | const |
Returns true if we have reached the end of the trace.
Definition at line 105 of file SkSLDebugTracePlayer.cpp.