All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreBreakpoint Class Reference

Class implementing breakpoint for debugging. More...

`#include <QoreProgram.h>`

Inheritance diagram for QoreBreakpoint:
[legend]
Collaboration diagram for QoreBreakpoint:
[legend]

## Public Member Functions

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 QoreListNode * | getStatementIds (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 QoreBreakpoint & | operator= (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 Functions 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 Functions 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 Functions

static DLLEXPORT QoreBreakpoint * | resolveBreakpointId (unsigned breakpointId)
| get the breakpoint from breakpoint id More...

## Public Attributes

BreakpointPolicy | policy

## Protected Member Functions

virtual DLLLOCAL bool | checkBreak () const
| check if program flow should be interrupted
Protected Member Functions 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

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

Add thread ID to the list

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

Assign QoreProgram to breakpoint.

Parameters

  new_pgm | QoreProgram to be assigned, when NULL then unassigns Program and deletes all statement references

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

Assign breakpoint to a statement.

DLLEXPORT void QoreBreakpoint::clearThreadIds | ( | ExceptionSink * | xsink | ) |

Clear list of the thread IDs

DLLEXPORT unsigned QoreBreakpoint::getBreakpointId | ( |  | ) | const

get the breakpoint id

Returns
  the breakpoint id which is unique number

DLLEXPORT QoreListNode* QoreBreakpoint::getStatementIds | ( | ExceptionSink * | xsink | ) |

Get list of statement ids

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

Get list of statements

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

Get list of the thread IDs

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

Check if thread is ID in list

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

Copy all props but object reference

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

Remove thread ID from the list

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

static

get the breakpoint from breakpoint id

Parameters

  breakpointId | provided by Program::getBreakpointId

Returns
  the original breakpoint or null if object cannot be resolved

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

Resolve statement from statement id

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

Set list of the thread IDs

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

Unassign breakpoint from statement

## Member Data Documentation

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:

- include/qore/QoreProgram.h (79e5dd4f976dab9d74ec8272aec97c21df86c597)