3.8.3 CADI Disassembler callbacks

The CADI Disassembler interface provides a callback mechanism that requires an appropriate implementation in the debugger.

The callback mechanism, unlike other callback mechanisms in CADI, is not intended to enable an asynchronous behavior. The CADI Disassembler calls that trigger callbacks are intended to be synchronous and all issued callbacks must be finished by the time the calling method returns.

The CADI Disassembler callbacks provide a way to return the requested disassembly information in character strings of arbitrary size without passing ownership of the corresponding data across library boundaries. Using this mechanism, the debugger receives a string buffer owned by the target and creates a local copy.

Note:

The string must be null terminated because the length of the issued string is not explicitly passed to the debugger.

Table 3-3 Relationships between CADIDisassembler and the callback methods

CADIDisassembler CADIDisassemblerCB
GetModeNames() ReceiveModeName()
GetDisassembly() ReceiveDisassembly()
GetSourceReferenceForAddress() ReceiveSourceReference()

In contrast to other callback mechanisms, the pointer to the utilized callback object is not registered to the disassembler instance but explicitly passed to it with each call.

Non-ConfidentialPDF file icon PDF versionARM 100963_0200_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.