Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QV4Debugger Class Reference

#include <qv4debugger.h>

+ Inheritance diagram for QV4Debugger:
+ Collaboration diagram for QV4Debugger:

Classes

struct  BreakPoint
 
struct  ExecutionState
 

Public Types

enum  State { Running , Paused }
 
enum  Speed {
  FullThrottle = 0 , StepOut , StepOver , StepIn ,
  NotStepping = FullThrottle
}
 
enum  PauseReason { PauseRequest , BreakPointHit , Throwing , Step }
 

Signals

void debuggerPaused (QV4Debugger *self, QV4Debugger::PauseReason reason)
 
void scheduleJob ()
 

Public Member Functions

 QV4Debugger (QV4::ExecutionEngine *engine)
 
QV4::ExecutionEngineengine () const
 
const QV4DataCollectorcollector () const
 
QV4DataCollectorcollector ()
 
void pause ()
 
void resume (Speed speed)
 
State state () const
 
void addBreakPoint (const QString &fileName, int lineNumber, const QString &condition=QString())
 
void removeBreakPoint (const QString &fileName, int lineNumber)
 
void setBreakOnThrow (bool onoff)
 
void clearPauseRequest ()
 
ExecutionState currentExecutionState () const
 
QVector< QV4::StackFramestackTrace (int frameLimit=-1) const
 
QVector< QV4::Heap::ExecutionContext::ContextType > getScopeTypes (int frame=0) const
 
QV4::FunctiongetFunction () const
 
void runInEngine (QV4DebugJob *job)
 
void maybeBreakAtInstruction () override
 
void enteringFunction () override
 
void leavingFunction (const QV4::ReturnedValue &retVal) override
 
void aboutToThrow () override
 
bool pauseAtNextOpportunity () const override
 
- Public Member Functions inherited from QV4::Debugging::Debugger
bool pauseAtNextOpportunity () const
 
void maybeBreakAtInstruction ()
 
void enteringFunction ()
 
void leavingFunction (const ReturnedValue &)
 
void aboutToThrow ()
 

Detailed Description

Definition at line 31 of file qv4debugger.h.

Member Enumeration Documentation

◆ PauseReason

Enumerator
PauseRequest 
BreakPointHit 
Throwing 
Step 

Definition at line 55 of file qv4debugger.h.

◆ Speed

Enumerator
FullThrottle 
StepOut 
StepOver 
StepIn 
NotStepping 

Definition at line 46 of file qv4debugger.h.

◆ State

Enumerator
Running 
Paused 

Definition at line 41 of file qv4debugger.h.

Constructor & Destructor Documentation

◆ QV4Debugger()

QV4Debugger::QV4Debugger ( QV4::ExecutionEngine * engine)

Definition at line 30 of file qv4debugger.cpp.

References connect(), Q_UNUSED, Qt::QueuedConnection, and scheduleJob().

+ Here is the call graph for this function:

Member Function Documentation

◆ aboutToThrow()

void QV4Debugger::aboutToThrow ( )
override

Definition at line 203 of file qv4debugger.cpp.

References Throwing.

◆ addBreakPoint()

void QV4Debugger::addBreakPoint ( const QString & fileName,
int lineNumber,
const QString & condition = QString() )

Definition at line 92 of file qv4debugger.cpp.

References fileName.

Referenced by QV4DebuggerAgent::addDebugger().

+ Here is the caller graph for this function:

◆ clearPauseRequest()

void QV4Debugger::clearPauseRequest ( )

Definition at line 115 of file qv4debugger.cpp.

◆ collector() [1/2]

QV4DataCollector * QV4Debugger::collector ( )

Definition at line 60 of file qv4debugger.cpp.

◆ collector() [2/2]

const QV4DataCollector * QV4Debugger::collector ( ) const

Definition at line 55 of file qv4debugger.cpp.

Referenced by QV4DebuggerAgent::debuggerPaused().

+ Here is the caller graph for this function:

◆ currentExecutionState()

QV4Debugger::ExecutionState QV4Debugger::currentExecutionState ( ) const

Definition at line 121 of file qv4debugger.cpp.

References QV4::EngineBase::currentStackFrame, engine(), QUrl::fileName(), getFunction(), QV4::CppStackFrame::lineNumber(), and state().

+ Here is the call graph for this function:

◆ debuggerPaused

void QV4Debugger::debuggerPaused ( QV4Debugger * self,
QV4Debugger::PauseReason reason )
signal

Referenced by QV4DebuggerAgent::addDebugger(), and QV4DebuggerAgent::removeDebugger().

+ Here is the caller graph for this function:

◆ engine()

QV4::ExecutionEngine * QV4Debugger::engine ( ) const

Definition at line 50 of file qv4debugger.cpp.

Referenced by currentExecutionState(), QV4DebuggerAgent::debuggerPaused(), maybeBreakAtInstruction(), and QV4DebugServiceImpl::stateAboutToBeChanged().

+ Here is the caller graph for this function:

◆ enteringFunction()

void QV4Debugger::enteringFunction ( )
override

Definition at line 178 of file qv4debugger.cpp.

References QV4::EngineBase::currentStackFrame, and StepIn.

◆ getFunction()

QV4::Function * QV4Debugger::getFunction ( ) const

Definition at line 215 of file qv4debugger.cpp.

References QV4::EngineBase::currentStackFrame, QV4::ExecutionEngine::globalCode, and QV4::CppStackFrame::v4Function.

Referenced by currentExecutionState(), and maybeBreakAtInstruction().

+ Here is the caller graph for this function:

◆ getScopeTypes()

QVector< QV4::Heap::ExecutionContext::ContextType > QV4Debugger::getScopeTypes ( int frame = 0) const

◆ leavingFunction()

void QV4Debugger::leavingFunction ( const QV4::ReturnedValue & retVal)
override

Definition at line 188 of file qv4debugger.cpp.

References QV4::EngineBase::currentStackFrame, NotStepping, QV4::CppStackFrame::parentFrame(), Q_UNUSED, QV4::PersistentValue::set(), and StepOver.

+ Here is the call graph for this function:

◆ maybeBreakAtInstruction()

void QV4Debugger::maybeBreakAtInstruction ( )
override

Definition at line 139 of file qv4debugger.cpp.

References BreakPointHit, QV4::EngineBase::currentStackFrame, engine(), getFunction(), QV4::CppStackFrame::lineNumber(), NotStepping, PauseRequest, Q_FALLTHROUGH, QV4DebugJob::run(), Step, StepIn, StepOut, and StepOver.

+ Here is the call graph for this function:

◆ pause()

void QV4Debugger::pause ( )

Definition at line 65 of file qv4debugger.cpp.

References Paused.

Referenced by QV4DebuggerAgent::pause().

+ Here is the caller graph for this function:

◆ pauseAtNextOpportunity()

bool QV4Debugger::pauseAtNextOpportunity ( ) const
override

Definition at line 130 of file qv4debugger.cpp.

References StepOver.

◆ removeBreakPoint()

void QV4Debugger::removeBreakPoint ( const QString & fileName,
int lineNumber )

Definition at line 100 of file qv4debugger.cpp.

References fileName.

◆ resume()

void QV4Debugger::resume ( Speed speed)

Definition at line 73 of file qv4debugger.cpp.

References QV4::EngineBase::currentStackFrame, QV4::PersistentValue::isUndefined(), Paused, QV4::PersistentValue::set(), QV4::Encode::undefined(), and QWaitCondition::wakeAll().

+ Here is the call graph for this function:

◆ runInEngine()

void QV4Debugger::runInEngine ( QV4DebugJob * job)

Definition at line 271 of file qv4debugger.cpp.

◆ scheduleJob

void QV4Debugger::scheduleJob ( )
signal

Referenced by QV4Debugger().

+ Here is the caller graph for this function:

◆ setBreakOnThrow()

void QV4Debugger::setBreakOnThrow ( bool onoff)

Definition at line 108 of file qv4debugger.cpp.

Referenced by QV4DebuggerAgent::addDebugger().

+ Here is the caller graph for this function:

◆ stackTrace()

QVector< QV4::StackFrame > QV4Debugger::stackTrace ( int frameLimit = -1) const

Definition at line 134 of file qv4debugger.cpp.

References QV4::ExecutionEngine::stackTrace().

+ Here is the call graph for this function:

◆ state()

QV4Debugger::State QV4Debugger::state ( ) const

Definition at line 87 of file qv4debugger.cpp.

Referenced by currentExecutionState().

+ Here is the caller graph for this function:

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