Qore Programming Language Reference Manual 1.18.1
Loading...
Searching...
No Matches
QC_DebugProgram.dox.h
1
3namespace Qore {
5
43
44public:
46/***
47 */
49
50public:
52/*** @return 0 if the operation was successful, returns -1 if the program does not allow debugging (i.e. @ref Qore::PO_NO_DEBUGGING is set) or -2 if the program has not been set as a debug target
53 */
55
56public:
58/*** @return 0 if the operation was successful, returns -1 if the program does not allow debugging (i.e. @ref Qore::PO_NO_DEBUGGING is set), -2 if the program has not been set as a debug target, or -3 if the given thread is not active in the target program
59 */
61
62public:
64/***
65 */
67
68public:
70
73
74public:
76/***
77 */
79
80public:
82/***
83 */
85
86public:
88/***
89 */
91
92public:
94/***
95 */
96abstract onAttach(ProgramControl pgm, reference rs, reference rtsid);
97
98public:
100/***
101 */
102abstract onDetach(ProgramControl pgm, reference rs, reference rtsid);
103
104public:
106
109abstract onException(ProgramControl pgm, int statement, hash ex, reference dismiss, reference rs, reference rtsid);
110
111public:
113
116abstract onExit(ProgramControl pgm, int statement, reference returnValue, reference rs, reference rtsid);
117
118public:
120
123abstract onFunctionEnter(ProgramControl pgm, int statement, reference rs, reference rtsid);
124
125public:
127
130abstract onFunctionExit(ProgramControl pgm, int statement, reference returnValue, reference rs, reference rtsid);
131
132public:
134/***
135 */
136abstract onStep(ProgramControl pgm, int blockStatement, *int statement, *int breakpointId, reference flow, reference rs, reference rtsid);
137
138public:
140/***
141 */
143
144public:
146/***
147 */
149};
157
159 const DebugDetach = DBG_RS_DETACH;
161 const DebugRun = DBG_RS_RUN;
163 const DebugStep = DBG_RS_STEP;
165 const DebugStepOver = DBG_RS_STEP_OVER;
167 const DebugUntilReturn = DBG_RS_UNTIL_RETURN;
169
175
177 const DebugFlowBreak = RC_BREAK;
179 const DebugFlowContinue = RC_CONTINUE;
181 const DebugFlowReturn = RC_RETURN;
183}
DebugProgram class supports Qore Program debugging via ProgramControl.
Definition: QC_DebugProgram.dox.h:42
int breakProgramThread(ProgramControl pgm, int tid)
Break particular program thread.
abstract onFunctionEnter(ProgramControl pgm, int statement, reference rs, reference rtsid)
Executed when a function is entered.
int breakProgram(ProgramControl pgm)
Break program, i.e. all threads.
nothing removeProgram(ProgramControl pgm)
Remove program from debugging.
abstract onFunctionExit(ProgramControl pgm, int statement, reference returnValue, reference rs, reference rtsid)
Executed when a function is exited.
list getAllPrograms()
Get all programs being debugged.
abstract onException(ProgramControl pgm, int statement, hash ex, reference dismiss, reference rs, reference rtsid)
Executed when an exception is raised.
abstract onDetach(ProgramControl pgm, reference rs, reference rtsid)
Executed when thread is datached from program being debugged.
nothing waitForTerminationAndClear()
Clear all programs and wait for all threads to finish executing callbacks.
destructor()
Waits for all threads to finish executing, then deletes all global variables, dereferences the intern...
abstract onStep(ProgramControl pgm, int blockStatement, *int statement, *int breakpointId, reference flow, reference rs, reference rtsid)
Executed when step is performed.
constructor()
Creates the debug program object with notification functions without any functionality.
copy()
Throws an exception to prevent objects of this class from being copied.
int getInterruptedCount()
Get number of interrupted threads.
nothing addProgram(ProgramControl pgm)
Add program to debugging.
abstract onAttach(ProgramControl pgm, reference rs, reference rtsid)
Executed when new thread is attached to program being debugged.
abstract onExit(ProgramControl pgm, int statement, reference returnValue, reference rs, reference rtsid)
Executed when a program/thread is exited.
The ProgramControl class provides safe information about a Qore program.
Definition: QC_ProgramControl.dox.h:45
const DebugFlowReturn
force return Statements command
Definition: QC_DebugProgram.dox.h:181
const DebugFlowContinue
force continue Statements command
Definition: QC_DebugProgram.dox.h:179
const DebugFlowBreak
force break Statements command
Definition: QC_DebugProgram.dox.h:177
const DebugStep
Run one step in program, in case of function call stepping goes on in function.
Definition: QC_DebugProgram.dox.h:163
const DebugDetach
Detach program from debugging, it is not normally used from script.
Definition: QC_DebugProgram.dox.h:159
const DebugUntilReturn
Run program till function is exited.
Definition: QC_DebugProgram.dox.h:167
const DebugStepOver
Run one step in program, in case of function call stepping does not go to function.
Definition: QC_DebugProgram.dox.h:165
const DebugRun
Run program, avoid stepping.
Definition: QC_DebugProgram.dox.h:161
hash< auto > hash()
Always returns the same hash passed.
list< auto > list(...)
Returns a list of the arguments passed at the top level.
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2