Qt 4.8
|
This class implements a state machine that uses the low-level events reported by the QScriptEngineAgent interface to implement debugging- specific functionality such as stepping and breakpoints. More...
#include <qscriptdebuggeragent_p.h>
Public Functions | |
QScriptBreakpointData | breakpointData (int id) const |
Returns the data associated with the breakpoint with the given id. More... | |
QScriptBreakpointMap | breakpoints () const |
Returns all breakpoints. More... | |
QList< qint64 > | contextIds () const |
void | contextPop () |
Reimplemented Function More... | |
void | contextPush () |
Reimplemented Function More... | |
QPair< QList< qint64 >, QList< qint64 > > | contextsCheckpoint () |
void | deleteAllBreakpoints () |
Deletes all breakpoints. More... | |
bool | deleteBreakpoint (int id) |
Deletes the breakpoint with the given id. More... | |
void | enterContinueMode () |
Instructs the agent to continue evaluation. More... | |
void | enterInterruptMode () |
Instructs the agent to interrupt evaluation. More... | |
void | enterReturnByForceMode (int contextIndex, const QScriptValue &value) |
void | enterRunToLocationMode (const QString &fileName, int lineNumber) |
Instructs the agent to continue evaluation until the location described by fileName and lineNumber is reached. More... | |
void | enterRunToLocationMode (qint64 scriptId, int lineNumber) |
Instructs the agent to continue evaluation until the location described by scriptId and lineNumber is reached. More... | |
void | enterStepIntoMode (int count=1) |
Instructs the agent to perform a "step into" operation. More... | |
void | enterStepOutMode () |
Instructs the agent to perform a "step out" operation. More... | |
void | enterStepOverMode (int count=1) |
Instructs the agent to perform a "step over" operation. More... | |
void | exceptionCatch (qint64 scriptId, const QScriptValue &exception) |
Reimplemented Function More... | |
void | exceptionThrow (qint64 scriptId, const QScriptValue &exception, bool hasHandler) |
Reimplemented Function More... | |
QVariant | extension (Extension extension, const QVariant &argument=QVariant()) |
Reimplemented Function More... | |
void | functionEntry (qint64 scriptId) |
Reimplemented Function More... | |
void | functionExit (qint64 scriptId, const QScriptValue &returnValue) |
Reimplemented Function More... | |
void | nullifyBackendPointer () |
void | positionChange (qint64 scriptId, int lineNumber, int columnNumber) |
Reimplemented Function More... | |
QScriptDebuggerAgent (QScriptDebuggerBackendPrivate *backend, QScriptEngine *engine) | |
Constructs a new agent for the given engine. More... | |
qint64 | resolveScript (const QString &fileName) const |
Returns the identifier of the script that has the given fileName, or -1 if there is no such script. More... | |
QScriptScriptData | scriptData (qint64 id) const |
Returns the data associated with the script with the given id. More... | |
void | scriptLoad (qint64 id, const QString &program, const QString &fileName, int baseLineNumber) |
Reimplemented Function More... | |
QScriptScriptMap | scripts () const |
Returns all scripts. More... | |
void | scriptsCheckpoint () |
Checkpoints the current scripts. More... | |
QPair< QList< qint64 >, QList< qint64 > > | scriptsDelta () const |
Returns the difference between the current checkpoint and the previous checkpoint. More... | |
void | scriptUnload (qint64 id) |
Reimplemented Function More... | |
int | setBreakpoint (const QScriptBreakpointData &data) |
Sets a breakpoint defined by the given data. More... | |
bool | setBreakpointData (int id, const QScriptBreakpointData &data) |
Sets the data associated with the breakpoint with the given id. More... | |
bool | supportsExtension (Extension extension) const |
Reimplemented Function More... | |
~QScriptDebuggerAgent () | |
Destroys this QScriptDebuggerAgent. More... | |
Public Functions inherited from QScriptEngineAgent | |
QScriptEngine * | engine () const |
Returns the QScriptEngine that this agent is associated with. More... | |
QScriptEngineAgent (QScriptEngine *engine) | |
Constructs a QScriptEngineAgent object for the given engine. More... | |
virtual | ~QScriptEngineAgent () |
Destroys this QScriptEngineAgent. More... | |
Properties | |
QScriptDebuggerAgentPrivate * | d_ptr |
Additional Inherited Members | |
Public Types inherited from QScriptEngineAgent | |
enum | Extension { DebuggerInvocationRequest } |
This enum specifies the possible extensions to a QScriptEngineAgent. More... | |
Protected Functions inherited from QScriptEngineAgent | |
QScriptEngineAgent (QScriptEngineAgentPrivate &dd, QScriptEngine *engine) | |
Protected Variables inherited from QScriptEngineAgent | |
QScopedPointer< QScriptEngineAgentPrivate > | d_ptr |
This class implements a state machine that uses the low-level events reported by the QScriptEngineAgent interface to implement debugging- specific functionality such as stepping and breakpoints.
It is used internally by the QScriptDebuggerBackend class.
Definition at line 68 of file qscriptdebuggeragent_p.h.
QScriptDebuggerAgent::QScriptDebuggerAgent | ( | QScriptDebuggerBackendPrivate * | backend, |
QScriptEngine * | engine | ||
) |
Constructs a new agent for the given engine.
The agent will report debugging-related events (e.g. step completion) to the given backend.
Definition at line 92 of file qscriptdebuggeragent.cpp.
QScriptDebuggerAgent::~QScriptDebuggerAgent | ( | ) |
Destroys this QScriptDebuggerAgent.
Definition at line 111 of file qscriptdebuggeragent.cpp.
QScriptBreakpointData QScriptDebuggerAgent::breakpointData | ( | int | id | ) | const |
Returns the data associated with the breakpoint with the given id.
Definition at line 335 of file qscriptdebuggeragent.cpp.
QScriptBreakpointMap QScriptDebuggerAgent::breakpoints | ( | ) | const |
Returns all breakpoints.
Definition at line 358 of file qscriptdebuggeragent.cpp.
Definition at line 424 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 510 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 499 of file qscriptdebuggeragent.cpp.
Definition at line 430 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::deleteAllBreakpoints | ( | ) |
Deletes all breakpoints.
Definition at line 323 of file qscriptdebuggeragent.cpp.
bool QScriptDebuggerAgent::deleteBreakpoint | ( | int | id | ) |
Deletes the breakpoint with the given id.
Returns true if the breakpoint was deleted, false if no such breakpoint exists.
Definition at line 272 of file qscriptdebuggeragent.cpp.
Referenced by positionChange().
void QScriptDebuggerAgent::enterContinueMode | ( | ) |
Instructs the agent to continue evaluation.
This function returns immediately.
Definition at line 168 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterInterruptMode | ( | ) |
Instructs the agent to interrupt evaluation.
This function returns immediately.
Definition at line 178 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterReturnByForceMode | ( | int | contextIndex, |
const QScriptValue & | value | ||
) |
Definition at line 212 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterRunToLocationMode | ( | const QString & | fileName, |
int | lineNumber | ||
) |
Instructs the agent to continue evaluation until the location described by fileName and lineNumber is reached.
This function returns immediately.
Definition at line 189 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterRunToLocationMode | ( | qint64 | scriptId, |
int | lineNumber | ||
) |
Instructs the agent to continue evaluation until the location described by scriptId and lineNumber is reached.
This function returns immediately.
Definition at line 203 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterStepIntoMode | ( | int | count = 1 | ) |
Instructs the agent to perform a "step into" operation.
This function returns immediately. The agent will report step completion at a later time, i.e. when script statements are evaluated.
Definition at line 124 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterStepOutMode | ( | ) |
Instructs the agent to perform a "step out" operation.
This function returns immediately. The agent will report step completion at a later time, i.e. when script statements are evaluated.
Definition at line 154 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::enterStepOverMode | ( | int | count = 1 | ) |
Instructs the agent to perform a "step over" operation.
This function returns immediately. The agent will report step completion at a later time, i.e. when script statements are evaluated.
Definition at line 137 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 697 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 680 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 715 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 520 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 534 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::nullifyBackendPointer | ( | ) |
Definition at line 445 of file qscriptdebuggeragent.cpp.
Referenced by QScriptDebuggerBackendPrivate::~QScriptDebuggerBackendPrivate().
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 560 of file qscriptdebuggeragent.cpp.
Returns the identifier of the script that has the given fileName, or -1 if there is no such script.
Definition at line 413 of file qscriptdebuggeragent.cpp.
Referenced by enterRunToLocationMode().
QScriptScriptData QScriptDebuggerAgent::scriptData | ( | qint64 | id | ) | const |
Returns the data associated with the script with the given id.
Definition at line 376 of file qscriptdebuggeragent.cpp.
Referenced by QScriptDebuggerBackendPrivate::breakpoint(), QScriptDebuggerBackendPrivate::debuggerInvocationRequest(), QScriptDebuggerBackendPrivate::exception(), QScriptDebuggerBackendPrivate::forcedReturn(), QScriptDebuggerBackendPrivate::interrupted(), QScriptDebuggerBackendPrivate::locationReached(), and QScriptDebuggerBackendPrivate::stepped().
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 454 of file qscriptdebuggeragent.cpp.
QScriptScriptMap QScriptDebuggerAgent::scripts | ( | ) | const |
Returns all scripts.
Definition at line 367 of file qscriptdebuggeragent.cpp.
void QScriptDebuggerAgent::scriptsCheckpoint | ( | ) |
Checkpoints the current scripts.
Definition at line 385 of file qscriptdebuggeragent.cpp.
Returns the difference between the current checkpoint and the previous checkpoint.
The first item in the pair is a list containing the identifiers of the scripts that were added. The second item in the pair is a list containing the identifiers of the scripts that were removed.
Definition at line 399 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 477 of file qscriptdebuggeragent.cpp.
int QScriptDebuggerAgent::setBreakpoint | ( | const QScriptBreakpointData & | data | ) |
Sets a breakpoint defined by the given data.
Returns an integer that uniquely identifies the new breakpoint, or -1 if setting the breakpoint failed.
Definition at line 227 of file qscriptdebuggeragent.cpp.
bool QScriptDebuggerAgent::setBreakpointData | ( | int | id, |
const QScriptBreakpointData & | data | ||
) |
Sets the data associated with the breakpoint with the given id.
Definition at line 345 of file qscriptdebuggeragent.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QScriptEngineAgent.
Definition at line 707 of file qscriptdebuggeragent.cpp.
|
private |
Definition at line 128 of file qscriptdebuggeragent_p.h.