2.2.5 Callback objects
This section describes the callback classes that the target connection mechanism of CADI uses.
CADIErrorCallback is primarily
used to report errors from a simulation to the registered caller.
This manages errors occurring during the target connection phase
and during the simulation itself.
CADISimulationCallback is required for
system-wide communication from a CADI simulation to the caller.
Callback methods of this class are of special importance for
the CADI interface because they are required to guarantee a clean
disconnection of a caller from a target or simulation and, if required,
a clean shutdown of the simulation. A shutdown requires the
simShutdown() indicates to
a caller that the simulation is shutting down. That might be the
result of a simulation being requested to shut down by an internal
event or by another attached debugger receiving this callback.
A caller must unregister all callback objects and release
all obtained interface pointers acquired during target connection.
If it is not possible to cleanly disconnect and
shut down the simulation, the
simKilled() callback must
be called. This tells the caller that the interface no longer exists because
of, for example, a hardware failure or memory access error.
simKilled() is received, a caller must
not access the corresponding simulation pointer or objects owned
by the simulation.