2.2.5. Callback objects

The target connection mechanism of CADI uses the following callback classes:

CADIErrorCallback

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

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() and simKilled() methods:

  • 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.

    After simKilled() is received, a caller must not access the corresponding simulation pointer or objects owned by the simulation.

See Disconnecting from a target for examples of disconnection and shutdown scenarios.

Copyright © 2014 ARM. All rights reserved.ARM DUI 0842B
Non-ConfidentialID111014