When GDB is configured and compiled, various macros are defined or left undefined, to control compilation based on the attributes of the host system. These macros and their meanings (or if the meaning is not documented here, then one of the source files where they are used is indicated) are:
GDBINIT_FILENAME
MEM_FNS_DECLARED
memcpy
and memset
. Define this
to avoid conflicts between the native include
files and the declarations in `defs.h'.
NO_SYS_FILE
<sys/file.h>
.
SIGWINCH_HANDLER
SIGWINCH
, you can define this to
be the name of a function to be called if SIGWINCH
is received.
SIGWINCH_HANDLER_BODY
SIGWINCH_HANDLER
.
ALIGN_STACK_ON_STARTUP
tgetent
if the stack happens not to be longword-aligned when main
is
called. This is a rare situation, but is known to occur on several
different types of systems.
CRLF_SOURCE_FILES
\r\n
rather than \n
as a
line terminator. This will cause source file listings to omit \r
characters when printing. It must be possible to open files in binary
mode using O_BINARY
or, for fopen, "rb"
.
DEFAULT_PROMPT
"(gdb) "
).
DEV_TTY
"/dev/tty"
.
FCLOSE_PROVIDED
fclose
in the headers included in
defs.h
. This isn't needed unless your compiler is unusually anal.
FOPEN_RB
GETENV_PROVIDED
getenv
in its headers included in
defs.h
. This isn't needed unless your compiler is unusually anal.
HAVE_MMAP
mmap
for reading symbol
tables. For some machines this allows for sharing and quick updates.
HAVE_SIGSETMASK
sigsetmask()
.
Currently, this is only true of the RS/6000.
HAVE_TERMIO
termio.h
.
HOST_BYTE_ORDER
BIG_ENDIAN
or LITTLE_ENDIAN
.
INT_MAX
INT_MIN
LONG_MAX
UINT_MAX
ULONG_MAX
ISATTY
KERNEL_U_ADDR
u
structure (the "user struct",
also known as the "u-page") in kernel virtual memory. GDB needs to know
this so that it can subtract this address from absolute addresses in
the upage, that are obtained via ptrace or from core files. On systems
that don't need this value, set it to zero.
KERNEL_U_ADDR_BSD
u
at runtime,
by using Berkeley-style nlist
on the kernel's image in the root
directory.
KERNEL_U_ADDR_HPUX
u
at runtime,
by using HP-style nlist
on the kernel's image in the root
directory.
LONGEST
long long
or long
,
depending on CC_HAS_LONG_LONG
.
CC_HAS_LONG_LONG
PRINTF_HAS_LONG_LONG
HAVE_LONG_DOUBLE
PRINTF_HAS_LONG_DOUBLE
SCANF_HAS_LONG_DOUBLE
LSEEK_NOT_LINEAR
lseek (n)
does not necessarily move to byte number
n
in the file. This is only used when reading source files. It
is normally faster to define CRLF_SOURCE_FILES
when possible.
L_SET
MAINTENANCE_CMDS
MALLOC_INCOMPATIBLE
malloc
differs from the
ANSI definition.
MMAP_BASE_ADDRESS
MMAP_INCREMENT
NEED_POSIX_SETPGID
setpgid
to determine
whether job control is available.
NORETURN
volatile
,
that can be used in both the declaration and definition of functions
to indicate that they never return. The default is already set
correctly if compiling with GCC.
This will almost never need to be defined.
ATTR_NORETURN
__attribute__ ((noreturn))
, that can be used in the declarations
of functions to indicate that they never return. The default is already
set correctly if compiling with GCC.
This will almost never need to be defined.
USE_MMALLOC
mmalloc
library for memory allocation for symbol
reading if this symbol is defined. Be careful defining it since there
are systems on which mmalloc
does not
work for some reason. One example is the DECstation, where its RPC
library can't cope with our redefinition of malloc
to call
mmalloc
. When defining USE_MMALLOC
, you will also have
to set MMALLOC
in the Makefile, to point to the mmalloc library.
This define is set when you configure with --with-mmalloc.
NO_MMCHECK
mmalloc
, but don't want the overhead
of checking the heap with mmcheck
. Note that on some systems,
the C runtime makes calls to malloc prior to calling main
, and if
free
is ever called with these pointers after calling mmcheck
to enable checking, a memory corruption abort is certain to occur. These
systems can still use mmalloc, but must define NO_MMCHECK.
MMCHECK_FORCE
mmcheck
being called, but that memory is never freed so we don't have to worry
about it triggering a memory corruption abort. The default is 0, which
means that mmcheck
will only install the heap checking functions
if there has not yet been any memory allocation calls, and if it fails
to install the functions, gdb will issue a warning. This is currently
defined if you configure using --with-mmalloc.
NO_SIGINTERRUPT
R_OK
SEEK_CUR
SEEK_SET
STOP_SIGNAL
USE_O_NOCTTY
USG
lint
volatile
__volatile__
or /**/
.
Platform-specific host conditionals.
ALTOS_AS
MOTOROLA
NBPG
DELTA88
DGUX
F_OK
UPAGES
Regex conditionals.
C_ALLOCA
NFAILURES
RE_NREGS
SIGN_EXTEND_CHAR
SWITCH_ENUM_BUG
SYNTAX_TABLE
Sword
sparc
Go to the first, previous, next, last section, table of contents.