Qore Programming Language  0.9.0
QoreBreakpoint Class Reference

Class implementing breakpoint for debugging. More...

#include <QoreProgram.h>

Inheritance diagram for QoreBreakpoint:
Collaboration diagram for QoreBreakpoint:

Public Member Methods

DLLEXPORT void addThreadId (int tid, ExceptionSink *xsink)
 
DLLEXPORT void assignProgram (QoreProgram *new_pgm, ExceptionSink *xsink)
 
DLLEXPORT void assignStatement (AbstractStatement *statement, ExceptionSink *xsink)
 
DLLEXPORT void clearThreadIds (ExceptionSink *xsink)
 
DLLEXPORT unsigned getBreakpointId () const
 get the breakpoint id More...
 
DLLEXPORT QoreListNodegetStatementIds (ExceptionSink *xsink)
 
DLLEXPORT void getStatements (AbstractStatementList_t &statList, ExceptionSink *xsink)
 
DLLEXPORT void getThreadIds (TidList_t &tidList, ExceptionSink *xsink)
 
DLLEXPORT bool isThreadId (int tid, ExceptionSink *xsink)
 
DLLEXPORT QoreBreakpointoperator= (const QoreBreakpoint &other)
 
DLLEXPORT void removeThreadId (int tid, ExceptionSink *xsink)
 
DLLEXPORT AbstractStatement * resolveStatementId (unsigned long statementId, ExceptionSink *xsink) const
 
DLLEXPORT void setThreadIds (TidList_t tidList, ExceptionSink *xsink)
 
DLLEXPORT void unassignStatement (AbstractStatement *statement, ExceptionSink *xsink)
 
- Public Member Methods inherited from AbstractPrivateData
virtual DLLLOCAL void deref (ExceptionSink *xsink)
 decrements the reference count of the object More...
 
virtual DLLLOCAL void deref ()
 decrements the reference count of the object without the possibility of throwing a Qore-language exception
 
DLLLOCAL void ref ()
 increments the reference count of the object More...
 
- Public Member Methods inherited from QoreReferenceCounter
DLLEXPORT QoreReferenceCounter ()
 creates the reference counter object
 
DLLEXPORT QoreReferenceCounter (const QoreReferenceCounter &old)
 creates a new object with a reference count of 1 More...
 
DLLEXPORT ~QoreReferenceCounter ()
 destroys the reference counter object
 
DLLEXPORT bool is_unique () const
 returns true if the reference count is 1 More...
 
DLLEXPORT int reference_count () const
 gets the reference count More...
 
DLLEXPORT bool ROdereference () const
 atomically decrements the reference count More...
 
DLLEXPORT void ROreference () const
 atomically increments the reference count
 

Static Public Member Methods

static DLLEXPORT QoreBreakpointresolveBreakpointId (unsigned breakpointId)
 get the breakpoint from breakpoint id More...
 

Public Attributes

BreakpointPolicy policy
 

Private Member Methods

virtual DLLLOCAL bool checkBreak () const
 check if program flow should be interrupted
 
- Private Member Methods inherited from AbstractPrivateData
virtual DLLLOCAL ~AbstractPrivateData ()
 as these objects are reference counted, the destructor should be called only when the reference count = 0 and not manually
 

Detailed Description

Class implementing breakpoint for debugging.

Breakpoint is assigned to one or more statements. When such a statement is executed then breakpoint is probed using checkBreak and program is potentially interrupted and callback QoreDebugProgram is triggered. The instance must be assigned to a QoreProgram

Member Function Documentation

◆ addThreadId()

DLLEXPORT void QoreBreakpoint::addThreadId ( int  tid,
ExceptionSink xsink 
)

Add thread ID to the list

◆ assignProgram()

DLLEXPORT void QoreBreakpoint::assignProgram ( QoreProgram new_pgm,
ExceptionSink xsink 
)

Assign QoreProgram to breakpoint.

Parameters
new_pgmQoreProgram to be assigned, when NULL then unassigns Program and deletes all statement references
xsinkif an error occurs, the Qore-language exception information will be added here

◆ assignStatement()

DLLEXPORT void QoreBreakpoint::assignStatement ( AbstractStatement *  statement,
ExceptionSink xsink 
)

Assign breakpoint to a statement.

◆ clearThreadIds()

DLLEXPORT void QoreBreakpoint::clearThreadIds ( ExceptionSink xsink)

Clear list of the thread IDs

◆ getBreakpointId()

DLLEXPORT unsigned QoreBreakpoint::getBreakpointId ( ) const

get the breakpoint id

Returns
the breakpoint id which is unique number

◆ getStatementIds()

DLLEXPORT QoreListNode* QoreBreakpoint::getStatementIds ( ExceptionSink xsink)

Get list of statement ids

◆ getStatements()

DLLEXPORT void QoreBreakpoint::getStatements ( AbstractStatementList_t &  statList,
ExceptionSink xsink 
)

Get list of statements

◆ getThreadIds()

DLLEXPORT void QoreBreakpoint::getThreadIds ( TidList_t &  tidList,
ExceptionSink xsink 
)

Get list of the thread IDs

◆ isThreadId()

DLLEXPORT bool QoreBreakpoint::isThreadId ( int  tid,
ExceptionSink xsink 
)

Check if thread is ID in list

◆ operator=()

DLLEXPORT QoreBreakpoint& QoreBreakpoint::operator= ( const QoreBreakpoint other)

Copy all props but object reference

◆ removeThreadId()

DLLEXPORT void QoreBreakpoint::removeThreadId ( int  tid,
ExceptionSink xsink 
)

Remove thread ID from the list

◆ resolveBreakpointId()

static DLLEXPORT QoreBreakpoint* QoreBreakpoint::resolveBreakpointId ( unsigned  breakpointId)
static

get the breakpoint from breakpoint id

Parameters
breakpointIdprovided by getBreakpointId
Returns
the original breakpoint or null if object cannot be resolved

◆ resolveStatementId()

DLLEXPORT AbstractStatement* QoreBreakpoint::resolveStatementId ( unsigned long  statementId,
ExceptionSink xsink 
) const

Resolve statement from statement id

◆ setThreadIds()

DLLEXPORT void QoreBreakpoint::setThreadIds ( TidList_t  tidList,
ExceptionSink xsink 
)

Set list of the thread IDs

◆ unassignStatement()

DLLEXPORT void QoreBreakpoint::unassignStatement ( AbstractStatement *  statement,
ExceptionSink xsink 
)

Unassign breakpoint from statement

Member Data Documentation

◆ policy

BreakpointPolicy QoreBreakpoint::policy

Defines policy how thread list is evaluated. In the case of ACCEPT policy are considered all TIDs in list. In case of REJECT policy are considered all TIDs not in the list.


The documentation for this class was generated from the following file: