| |||
| Home > The Cycle Accurate Debug Interface > Defining a CADI interface > CADI::CADIRegGetMap() |
The debugger for the target must call this once after connecting to the target. All registers must be reported even if they are part of a compound register. All register numbers must be unique both for registers in the same group and register numbers in other groups.
virtual CADIReturn_t CADI::CADIRegGetMap (uint32_t groupID,
uint32_t startRegisterIndex, uint32_t desiredNumOfRegisters,
uint32_t * actualNumOfRegisters, CADIRegInfo_t * reg) =0
where:
groupIDidentifies the ID of the group whose map is requested.
If the value is CADI_REG_ALLGROUPS, all registers
are returned.
startRegisterIndexis the index into the target’s list of registers. It is not register numbers.
desiredNumOfRegistersis the total number of registers desired by the caller. The caller must allocate a buffer size that is enough to hold the requested number of registers.
actualNumOfRegisterson return, is the number of registers returned by the target. Any value set on input is ignored.
regis the register information. The array is allocated (and deallocated, if applicable) by the caller to be filled by the target. The amount of space allocated must be enough to hold the number of registers requested. If the count is greater than the targets number of registers, the target must return all the registers.
The CADIRegInfo_t structure is defined
as:
struct CADIRegInfo_t
{
char name[CADI_NAME_SIZE];
char description[CADI_DESCRIPTION];
uint32_t regNumber;
uint32_t bitsWide;
int32_t hasSideEffects;
CADIRegDetails_t details;
CADIRegDisplay_t display; //Default is "HEX".
CADIRegSymbols_t symbols; // For type "symbolic" only.
CADIRegFloatFormat_t fpFormat; // For type "float" only.
uint32_t lsbOffset; // Offset of the least significant bit
// relative to bit 0 in the parent
// register (or 0 if there is no parent).
enum { CADI_REGINFO_NO_DWARF_INDEX = 0xffffffff };
uint32_t dwarfIndex; // DWARF register index
// (CADI_REGINFO_NO_DWARF_INDEX if
// register has no DWARF index).
bool isProfiled; // Profiling info is available for reg
bool isPipeStageField; // Is pipe stage field, also true
// for pc and contentInfoRegisterId in
// CADIPipeStage_t.
uint32_t threadID; // Thread identifiers. If zero, then not
// assigned to a thread.
CADIRegAccessAttribute_t attribute; // Register access
// attributes.
};