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  TclObject command,
13  TclObject condition,
14  Debugger& debugger_,
15  ProbeBase& probe_,
16  unsigned newId /*= -1*/)
17  : BreakPointBase(cliComm, command, condition)
18  , debugger(debugger_)
19  , probe(probe_)
20  , id((newId == unsigned(-1)) ? ++lastId : newId)
21 {
22  probe.attach(*this);
23 }
24 
26 {
27  probe.detach(*this);
28 }
29 
30 void ProbeBreakPoint::update(const ProbeBase& /*subject*/)
31 {
33 }
34 
35 void ProbeBreakPoint::subjectDeleted(const ProbeBase& /*subject*/)
36 {
37  debugger.removeProbeBreakPoint(*this);
38 }
39 
40 } // namespace openmsx
ProbeBreakPoint(GlobalCliComm &CliComm, TclObject command, TclObject condition, Debugger &debugger, ProbeBase &probe, unsigned newId=-1)
void removeProbeBreakPoint(ProbeBreakPoint &bp)
Definition: Debugger.cc:221
void attach(Observer< T > &observer)
Definition: Subject.hh:51
Base class for CPU break and watch points.
void detach(Observer< T > &observer)
Definition: Subject.hh:57