www.delorie.com/gnu/docs/gdb/gdbint_60.html   search  
 
Buy the book!


GDB Internals

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1 Adding a New Host

GDB's host configuration support normally happens via Autoconf. New host-specific definitions should not be needed. Older hosts GDB still use the host-specific definitions and files listed below, but these mostly exist for historical reasons, and will eventually disappear.

`gdb/config/arch/xyz.mh'
This file once contained both host and native configuration information (see section 11. Native Debugging) for the machine xyz. The host configuration information is now handed by Autoconf.

Host configuration information included a definition of XM_FILE=xm-xyz.h and possibly definitions for CC, SYSV_DEFINE, XM_CFLAGS, XM_ADD_FILES, XM_CLIBS, XM_CDEPS, etc.; see `Makefile.in'.

New host only configurations do not need this file.

`gdb/config/arch/xm-xyz.h'
This file once contained definitions and includes required when hosting gdb on machine xyz. Those definitions and includes are now handled by Autoconf.

New host and native configurations do not need this file.

Maintainer's note: Some hosts continue to use the `xm-xyz.h' file to define the macros HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT and HOST_LONG_DOUBLE_FORMAT. That code also needs to be replaced with either an Autoconf or run-time test.

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-xyz.h' file. If these routines work for the xyz 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 xyz-xdep.c, and put xyz-xdep.o into XDEPFILES.

`ser-unix.c'
This contains serial line support for Unix systems. This is always included, via the makefile variable SER_HARDWIRE; override this variable in the `.mh' file to avoid it.

`ser-go32.c'
This contains serial line support for 32-bit programs running under DOS, using the DJGPP (a.k.a. GO32) execution environment.

`ser-tcp.c'
This contains generic TCP support using sockets.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003