Adding target described register support

Target descriptions can report additional registers specific to an instance of the target. But it takes a little work in the architecture specific routines to support this. The relevant functions are described in target-descriptions.h.

A target description must either have no registers or a complete set—this avoids complexity in trying to merge standard registers with the target defined registers. It is the architecture's responsibility to validate that a description with registers has everything it needs. To keep architecture code simple, the same mechanism is used to assign fixed internal register numbers to standard registers.

If tdesc_has_registers returns 1, the description contains registers. The architecture's gdbarch_init routine should:

After tdesc_use_registers has been called, the architecture's register_name, register_type, and register_reggroup_p routines will not be called; that information will be taken from the target description. num_regs may be increased to account for any additional registers in the description.

Pseudo-registers require some extra care:

None: Internals Adding-Target-Described-Register-Support (last edited 2013-09-01 12:28:15 by JeremyBennett)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.