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

The relationships between the methods of CADIDisassembler and the related callback methods are listed in Table 3.3:

Table 3.3. Relationships between CADIDisassembler and the callback methods

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

Copyright © 2008-2014 ARM. All rights reserved.ARM DUI 0444M
Non-ConfidentialID051314