openMSX
ProbeBreakPoint.cc
Go to the documentation of this file.
1 #include "ProbeBreakPoint.hh"
2 #include "Probe.hh"
3 #include "Debugger.hh"
4 #include "TclObject.hh"
5 
6 namespace openmsx {
7 
8 unsigned ProbeBreakPoint::lastId = 0;
9 
11  GlobalCliComm& cliComm,
12  Interpreter& interp,
13  TclObject command,
14  TclObject condition,
15  Debugger& debugger_,
16  ProbeBase& probe_,
17  unsigned newId /*= -1*/)
18  : BreakPointBase(cliComm, interp, command, condition)
19  , debugger(debugger_)
20  , probe(probe_)
21  , id((newId == unsigned(-1)) ? ++lastId : newId)
22 {
23  probe.attach(*this);
24 }
25 
27 {
28  probe.detach(*this);
29 }
30 
31 void ProbeBreakPoint::update(const ProbeBase& /*subject*/)
32 {
34 }
35 
36 void ProbeBreakPoint::subjectDeleted(const ProbeBase& /*subject*/)
37 {
38  debugger.removeProbeBreakPoint(*this);
39 }
40 
41 } // namespace openmsx
ProbeBreakPoint(GlobalCliComm &CliComm, Interpreter &interp, TclObject command, TclObject condition, Debugger &debugger, ProbeBase &probe, unsigned newId=-1)
void removeProbeBreakPoint(ProbeBreakPoint &bp)
Definition: Debugger.cc:198
void attach(Observer< T > &observer)
Definition: Subject.hh:52
Base class for CPU break and watch points.
void detach(Observer< T > &observer)
Definition: Subject.hh:58