Qore Programming Language Reference Manual  0.8.13.5
 All Classes Namespaces Functions Variables Groups Pages
Qore::Breakpoint Class Reference

Breakpoint class supports breakpoint setting for particular Qore ProgramControl when debugging. More...

Public Member Functions

nothing addThreadId (int tid)
 Add thread ID to the list.
 
nothing assignProgram (ProgramControl pgm)
 Assign Program to breakpoint.
 
nothing assignStatement (int statementId)
 Assign breakpoint to a statement.
 
nothing clearThreadIds ()
 Clear list of the thread IDs.
 
 constructor ()
 Creates the breakpoint object with notification functions without any functionality.
 
 copy ()
 Creates copy of breakpoint object.
 
 destructor ()
 Unlinks from Breakpoint object and dereferences it.
 
int getBreakpointId ()
 Get breakpoint id. More...
 
bool getEnabled ()
 Get enabled state of breakpoint.
 
int getPolicy ()
 Get policy how thread list is evaluated. See Breakpoint Policy Constants.
 
ProgramControl getProgram ()
 Get ProgramControl assigned to the breakpoint. More...
 
list getStatementIds ()
 Get list of statements.
 
list getThreadIds ()
 Get list of the thread IDs.
 
bool isThreadId (softint tid)
 Check if thread is ID in list.
 
nothing removeThreadId (int tid)
 Remove thread ID from the list.
 
nothing setEnabled (bool enabled)
 Set enabled state to breakpoint.
 
nothing setPolicy (softint policy)
 Defines policy how thread list is evaluated. See Breakpoint Policy Constants. More...
 
nothing setThreadIds (softlist tidList)
 Set list of the thread IDs.
 
nothing unassignProgram ()
 Unassign Program from breakpoint and deletes all statement references.
 
nothing unassignStatement (int statementId)
 Unassign breakpoint from statement.
 

Static Public Member Functions

static Breakpoint resolveBreakpointId (int breakpointId)
 Get instance of breakpoint id. More...
 

Detailed Description

Breakpoint class supports breakpoint setting for particular Qore ProgramControl when debugging.

Breakpoint is assigned to one or more statement. When program flows through it then DebugProgram callback is executed. Breakpoint activity may be limited to one or more threads.

Restrictions:
MUST HAVE: Qore::PO_ALLOW_DEBUGGER
Example:
1 ProgramControl p = ProgramControl::getProgram();
2 .....
3 Breakpoint b = new Breakpoint();
4 b.setPolicy(BreakpointPolicyNone);
5 #b.addThreadId(tidToBreak);
6 b.setEnabled(True);
7 b.assignStatement(p.findStatementId(fileToBreak, lineToBreak));
8 b.assignProgram(p);
Since
Qore 0.8.13

Member Function Documentation

int Qore::Breakpoint::getBreakpointId ( )

Get breakpoint id.

Code Flags:
RET_VALUE_ONLY
ProgramControl Qore::Breakpoint::getProgram ( )

Get ProgramControl assigned to the breakpoint.

Restrictions:
MUST HAVE: Qore::PO_ALLOW_DEBUGGER
Code Flags:
RET_VALUE_ONLY
Exceptions
BREAKPOINT-ERRORif a program is not assigned to Breakpoint instance
static Breakpoint Qore::Breakpoint::resolveBreakpointId ( int  breakpointId)
static

Get instance of breakpoint id.

Exceptions
BREAKPOINT-ERRORif the breakpointId cannot identify Breakpoint instance
nothing Qore::Breakpoint::setPolicy ( softint  policy)

Defines policy how thread list is evaluated. See Breakpoint Policy Constants.

Exceptions
BREAKPOINT-ERRORif policy is wrong value