Qore Programming Language Reference Manual  1.8.0
Qore::Breakpoint Class Reference

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

Public Member Methods

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< intgetStatementIds ()
 Get list of statements.
 
list< intgetThreadIds ()
 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< softint > 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 Methods

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:
ProgramControl p = ProgramControl::getProgram();
.....
Breakpoint b = new Breakpoint();
b.setPolicy(BreakpointPolicyNone);
#b.addThreadId(tidToBreak);
b.setEnabled(True);
b.assignStatement(p.findStatementId(fileToBreak, lineToBreak));
b.assignProgram(p);
Since
Qore 0.8.13

Member Function Documentation

◆ getBreakpointId()

int Qore::Breakpoint::getBreakpointId ( )

Get breakpoint id.

Code Flags:
RET_VALUE_ONLY

◆ getProgram()

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

◆ resolveBreakpointId()

static Breakpoint Qore::Breakpoint::resolveBreakpointId ( int  breakpointId)
static

Get instance of breakpoint id.

Exceptions
BREAKPOINT-ERRORif the breakpointId cannot identify Breakpoint instance

◆ setPolicy()

nothing Qore::Breakpoint::setPolicy ( softint  policy)

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

Exceptions
BREAKPOINT-ERRORif policy is wrong value