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