6.1 CADI examples

Example CADI clients that demonstrate how to use the CADI API to perform common debugger operations. These include instantiating a new simulation, connecting to a running simulation, accessing memory and registers, setting breakpoints, and registering callbacks for asynchronous feedback from the simulation.

Each of these examples has a readme.txt that describes the example, how to run it, and in some cases, gives the expected output. The following CADI examples are provided:

Table 6-2 CADI examples

Example Description
breakpoints Sets a code breakpoint at a specific address in the application that is running on the model.
cache_dump Displays information about the caches in the running simulation.
cadi_lib Implements a shared library that contains a CADI simulation. You can load the library into Model Shell and connect a CADI-compliant debugger to it.
cadi_server

Implements an executable that contains a CADI simulation. It loads the plug-in library CADIIPCRemoteConnection.so, which enables you to connect a CADI-compliant debugger to it.

You can run the connecting_running_target CADI example to mimic this connection.
connecting_instantiating_model Instantiates a simulation that is a shared library, prints a list of all targets in the simulation, and connects to one of them.
connecting_remote_target Connects to a remote simulation that has been configured to allow remote connections. The IP address and listening port are passed as parameters to the CADI client.
connecting_running_target Connects to a running CADI target.
disassembly Prints the disassembly of the instruction at the PC address in the application that is running on the model.
memory Displays memory space information. Reads and displays some values from memory in the application that is running on the model.
mti Loads the TarmacTrace MTI plug-in into the application that is running on the model and displays some tarmac trace output.
registers Reads and displays register information for a CPU target in the model and reads and writes a specific register.
tlb_dump Connects to a model and displays the contents of the TLBs.
Non-ConfidentialPDF file icon PDF version100964_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.