Previous: Target Conditionals, Up: Target Architecture Definition


10.12 Adding a New Target

The following files add a target to gdb:

gdb/config/arch/ttt.mt
Contains a Makefile fragment specific to this target. Specifies what object files are needed for target ttt, by defining ‘TDEPFILES=...’ and ‘TDEPLIBS=...’.

You can also define ‘TM_CLIBS’ and ‘TM_CDEPS’, but these are now deprecated, replaced by autoconf, and may go away in future versions of gdb.

gdb/ttt-tdep.c
Contains any miscellaneous code required for this target machine. On some machines it doesn't exist at all.
gdb/arch-tdep.c
gdb/arch-tdep.h
This is required to describe the basic layout of the target machine's processor chip (registers, stack, etc.). It can be shared among many targets that use the same processor architecture.

(Target header files such as gdb/config/arch/tm-ttt.h, gdb/config/arch/tm-arch.h, and config/tm-os.h are no longer used.)