18 #ifndef INCLUDED_THREADDEBUGGER
19 #define INCLUDED_THREADDEBUGGER
90 JSTrapStatus
TrapHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, jsval closure);
92 JSTrapStatus
ThrowHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval);
95 JSTrapStatus
BreakHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, jsval closure,
BREAK_SRC breakSrc);
96 JSTrapStatus
StepHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
void *closure);
97 JSTrapStatus
StepIntoHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
void *closure);
98 JSTrapStatus
StepOutHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
void *closure);
106 void ExecuteHook(JSContext *cx,
const char *filename,
unsigned lineno, JSScript *script, JSFunction *fun,
void *callerdata);
108 void NewScriptHook(JSContext *cx,
const char *filename,
unsigned lineno, JSScript *script, JSFunction *fun,
void *callerdata);
180 std::auto_ptr<ThreadDebugger_impl>
m;
183 #endif // INCLUDED_THREADDEBUGGER
std::auto_ptr< ThreadDebugger_impl > m
void ReturnActiveBreakPoints(jsbytecode *pBytecode)
void SetLastBreakLine(uint breakLine)
bool CurrentFrameIsChildOf(JSStackFrame *pParentFrame)
JSTrapStatus StepOutHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure)
JSTrapStatus ThrowHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval)
Hook to capture exceptions and breakpoints in code (throw "Breakpoint";)
JSTrapStatus StepIntoHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure)
bool CheckIfMappingPresent(std::string filename, uint line)
Checks if a mapping for the specified filename and line number exists in this CThreadDebugger's conte...
void SetAllNewTraps()
Checks if a mapping exists for each breakpoint in the list of breakpoints that aren't set yet...
void ClearTrap(CActiveBreakPoint *activeBreakPoint)
bool CompareScriptInterfacePtr(ScriptInterface *pScriptInterface) const
Compares the object's associated scriptinterface with the pointer passed as parameter.
JSTrapStatus CheckForBreakRequestHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure)
This is an interrup-hook that can be called multiple times per line of code and is used to break into...
void SetNextDbgCmd(DBGCMD dbgCmd)
void Initialize(uint id, std::string name, ScriptInterface *pScriptInterface, CDebuggingServer *pDebuggingServer)
Initialize the object (required before using the object!).
void DestroyScriptHook(JSContext *cx, JSScript *script)
This hook makes sure that invalid mappings between filename plus line-number and jsbytecode points ge...
bool ToggleBreakPoint(std::string filename, uint userLine)
Toggle a breakpoint if it's active in this threadDebugger object.
void GetStackFrameData(std::stringstream &response, uint nestingLevel, STACK_INFO stackInfoKind)
void SaveStackFrameData(STACK_INFO stackInfo, uint nestingLevel)
JSTrapStatus BreakHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, jsval closure, BREAK_SRC breakSrc)
All other hooks call this one if the execution should be paused.
void ClearTrapsToRemove()
Used only in the scriptinterface's thread.
void NewScriptHook(JSContext *cx, const char *filename, unsigned lineno, JSScript *script, JSFunction *fun, void *callerdata)
This hook is used to update the mapping between filename plus line-numbers and jsbytecode pointers...
std::string StringifyCyclicJSON(jsval obj, bool indent)
void ExecuteHook(JSContext *cx, const char *filename, unsigned lineno, JSScript *script, JSFunction *fun, void *callerdata)
The callback function which gets executed for each new script that gets loaded and each function insi...
std::string GetBreakFileName()
void GetCallstack(std::stringstream &response)
void SetNewTrap(CActiveBreakPoint *activeBreakPoint, std::string filename, uint line)
Sets a new trap and stores the information in the CActiveBreakPoint pointer Make sure that a mapping ...
Abstraction around a SpiderMonkey JSContext.
void SetBreakFileName(std::string breakFileName)
CActiveBreakPoint(CBreakPoint breakPoint)
JSTrapStatus TrapHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, jsval closure)
Simply calls BreakHandler with BREAK_SRC_TRAP.
void SetIsInBreak(bool isInBreak)
JSTrapStatus StepHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure)
void AddStackInfoRequest(STACK_INFO requestType, uint nestingLevel, SDL_sem *semaphore)