3.8.6 Disassembly acquisition

Call GetDisassembly() to get the disassembly from a CADI Disassembler.

The GetDisassembly() method has these parameters:

callback
The callback object for the debugger to use to return the disassembly information.
address
The address the disassembly starts from.
nextAddr

Used by the disassembler to return the next address that can be disassembled. This gives the debugger a hint where to continue with disassembling after the last instruction of the current request.

This information is particularly useful for uncompleted calls. It gives the debugger an address from which it can resume.

mode
The mode used to disassemble the data. This can either be an explicitly selected mode or the mode the processing unit is currently in. For the latter case, the don’t care ID of 0 must be forwarded.
desiredCount
The number of instructions for the disassembler to process. This must also be the maximum number of ReceivedDisassembly() callbacks issued.

Note:

The desiredCount refers to the number of requested instructions. If the mode ID is 0, the size of the instruction words can vary if the mode changes in between. It is therefore possible that the distance between the addresses (as returned by the callback) is not equally spaced.

It might be necessary to update nextAddr after the last instruction is reached. If the last valid instruction within a memory space is reached, nextAddr must be set to this last instruction. The last valid instruction can be determined by testing these conditions:

  • nextAddr is identical to the requested address.
  • The GetDisassembly() call returns with CADI_DISASSEMBLER_STATUS_OK and triggers only one ReceiveDisassembly() callback no matter how many instructions are requested.
Figure 3-4 nextAddr set to last instruction.A call where the last instruction in the range is a valid instruction.
To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Figure 3-5 nextAddr set to last valid instruction.A call where the last instruction in the range is the last instruction in the memory space.
To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


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