Once you have specified a new configuration for your host (see section Adding a New Configuration), there are three remaining pieces to making GDB work on a new machine. First, you have to make it host on the new machine (compile there, handle that machine's terminals properly, etc). If you will be cross-debugging to some other kind of system that's already supported, you are done.
If you want to use GDB to debug programs that run on the new machine, you have to get it to understand the machine's object files, symbol files, and interfaces to processes; see section Adding a New Target and see section Adding a New Native Configuration
Several files control GDB's configuration for host systems:
XM_FILE= xm-xxx.h
. You can also define CC
,
REGEX
and REGEX1
, SYSV_DEFINE
, XM_CFLAGS
,
XM_ADD_FILES
, XM_CLIBS
, XM_CDEPS
,
etc.; see `Makefile.in'.
XDEPFILES
line
in `gdb/config/mh-xxx'.
There are some "generic" versions of routines that can be used by
various systems. These can be customized in various ways by macros
defined in your `xm-xxx.h' file. If these routines work for
the xxx host, you can just include the generic file's name (with
`.o', not `.c') in XDEPFILES
.
Otherwise, if your machine needs custom support routines, you will need
to write routines that perform the same functions as the generic file.
Put them into xxx-xdep.c
, and put xxx-xdep.o
into XDEPFILES
.
Now, you are now ready to try configuring GDB to compile using your system as its host. From the top level (above `bfd', `gdb', etc), do:
./configure xxx --target=vxworks960
This will configure your system to cross-compile for VxWorks on the Intel 960, which is probably not what you really want, but it's a test case that works at this stage. (You haven't set up to be able to debug programs that run on xxx yet.)
If this succeeds, you can try building it all with:
make
Repeat until the program configures, compiles, links, and runs. When run, it won't be able to do much (unless you have a VxWorks/960 board on your network) but you will know that the host support is pretty well done.
Good luck! Comments and suggestions about this section are particularly welcome; send them to `bug-gdb@prep.ai.mit.edu'.