Go forward to Native.
Go backward to Config.
Go up to Top.
Adding a New Host
Once you have specified a new configuration for your host (
see Adding a New Configuration: Config.), 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 Adding a New Target: Target.
and see Adding a New Native Configuration: Native.
Several files control GDB's configuration for host systems:
Specifies Makefile fragments needed when hosting on machine XXX.
In particular, this lists the required machine-dependent object
files, by defining `XDEPFILES=...'. Also specifies the header
file which describes host XXX, by defining `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
(`xm.h' is a link to this file, created by configure). Contains C
macro definitions describing the host system environment, such as
byte order, host C compiler and library, ptrace support, and core
file structure. Crib from existing `xm-*.h' files to create a new
Contains any miscellaneous C code required for this machine as a
host. On many machines it doesn't exist at all. If it does
exist, put `XXX-xdep.o' into the `XDEPFILES' line in
Generic Host Support Files
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
This contains serial line support for Berkeley-derived Unix
This contains serial line support for 32-bit programs running
under DOS using the GO32 execution environment.
This contains serial line support for System V-derived Unix
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:
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 `firstname.lastname@example.org'.