* Languages:: Defining New Source Languages
* Releases:: Configuring GDB for Release
* Partial Symbol Tables:: How GDB reads symbols quickly at startup
+* Types:: How GDB keeps track of types
* BFD support for GDB:: How BFD and GDB interface
* Symbol Reading:: Defining New Symbol Readers
* Cleanups:: Cleanups
Host-Dependent Files
@table @file
-@item config/*.mh
+@item config/*/*.mh
Sets Makefile parameters
-@item xm-*.h
+@item config/*/xm-*.h
Global #include's and #define's and definitions
@item *-xdep.c
Global variables and functions
Native-Dependent Files
@table @file
-@item config/*.mh
+@item config/*/*.mh
Sets Makefile parameters (for @emph{both} host and native)
-@item nm-*.h
+@item config/*/nm-*.h
#include's and #define's and definitions. This file
is only included by the small number of modules that need it,
so beware of doing feature-test #define's from its macros.
Target-Dependent Files
@table @file
-@item config/*.mt
+@item config/*/*.mt
Sets Makefile parameters
-@item tm-*.h
+@item config/*/tm-*.h
Global #include's and #define's and definitions
@item *-tdep.c
Global variables and functions
At this writing, most supported hosts have had their host and native
dependencies sorted out properly. There are a few stragglers, which
can be recognized by the absence of NATDEPFILES lines in their
-@file{config/*.mh}.
+@file{config/*/*.mh}.
@node Config
@chapter Adding a New Configuration
Several files control GDB's configuration for host systems:
@table @file
-@item gdb/config/mh-@var{xxx}
+@item gdb/config/@var{arch}/@var{xxx}.mh
Specifies Makefile fragments needed when hosting on machine @var{xxx}.
In particular, this lists the required machine-dependent object files,
by defining @samp{XDEPFILES=@dots{}}. Also
@samp{XM_ADD_FILES}, @samp{XM_CLIBS}, @samp{XM_CDEPS},
etc.; see @file{Makefile.in}.
-@item gdb/xm-@var{xxx}.h
+@item gdb/config/@var{arch}/xm-@var{xxx}.h
(@file{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,
native support:
@table @file
-@item gdb/config/@var{xxx}.mh
+@item gdb/config/@var{xarch}/@var{xxx}.mh
Specifies Makefile fragments needed when hosting @emph{or native}
on machine @var{xxx}.
In particular, this lists the required native-dependent object files,
@samp{NAT_ADD_FILES}, @samp{NAT_CLIBS}, @samp{NAT_CDEPS},
etc.; see @file{Makefile.in}.
-@item gdb/nm-@var{xxx}.h
+@item gdb/config/@var{arch}/nm-@var{xxx}.h
(@file{nm.h} is a link to this file, created by configure).
Contains C macro definitions describing the native system environment,
such as child process control and core file support.
A variety of files specify attributes of the GDB target environment:
@table @file
-@item gdb/config/@var{ttt}.mt
+@item gdb/config/@var{arch}/@var{ttt}.mt
Contains a Makefile fragment specific to this target.
Specifies what object files are needed for target @var{ttt}, by
defining @samp{TDEPFILES=@dots{}}.
@samp{TM_CLIBS}, @samp{TM_CDEPS},
and other Makefile variables here; see @file{Makefile.in}.
-@item gdb/tm-@var{ttt}.h
+@item gdb/config/@var{arch}/tm-@var{ttt}.h
(@file{tm.h} is a link to this file, created by configure).
Contains macro definitions about the target machine's
registers, stack frame format and instructions.
between the debugger and the assembler, if the GNU assembler has been
ported to the target machine.
-@item gdb/tm-@var{arch}.h
+@item gdb/config/@var{arch}/tm-@var{arch}.h
This often exists to describe the basic layout of the target machine's
processor chip (registers, stack, etc).
If used, it is included by @file{tm-@var{xxx}.h}. It can
little to be gained by trying to free them unless you want to do a lot
more work.
+@node Types
+@chapter Types
+
+Fundamental Types (e.g., FT_VOID, FT_BOOLEAN).
+
+These are the fundamental types that gdb uses internally. Fundamental
+types from the various debugging formats (stabs, ELF, etc) are mapped into
+one of these. They are basically a union of all fundamental types that
+gdb knows about for all the languages that gdb knows about.
+
+Type Codes (e.g., TYPE_CODE_PTR, TYPE_CODE_ARRAY).
+
+Each time gdb builds an internal type, it marks it with one of these
+types. The type may be a fundamental type, such as TYPE_CODE_INT, or
+a derived type, such as TYPE_CODE_PTR which is a pointer to another
+type. Typically, several FT_* types map to one TYPE_CODE_* type, and
+are distinguished by other members of the type struct, such as whether
+the type is signed or unsigned, and how many bits it uses.
+
+Builtin Types (e.g., builtin_type_void, builtin_type_char).
+
+These are instances of type structs that roughly correspond to fundamental
+types and are created as global types for gdb to use for various ugly
+historical reasons. We eventually want to eliminate these. Note for
+example that builtin_type_int initialized in gdbtypes.c is basically the
+same as a TYPE_CODE_INT type that is initialized in c-lang.c for an
+FT_INTEGER fundamental type. The difference is that the builtin_type is
+not associated with any particular objfile, and only one instance exists,
+while c-lang.c builds as many TYPE_CODE_INT types as needed, with each
+one associated with some particular objfile.
+
@node BFD support for GDB
@chapter Binary File Descriptor Library Support for GDB
@item BLOCK_ADDRESS_ABSOLUTE
dbxread.c
@item BPT_VECTOR
-tm-68k.h
+tm-m68k.h
@item BREAKPOINT
-tm-68k.h
+tm-m68k.h
@item BREAKPOINT_DEBUG
breakpoint.c
@item BROKEN_LARGE_ALLOCA
regex.c
@item C_GLBLREG
coffread.c
-@item DAMON
-xcoffexec.c
@item DBXREAD_ONLY
partial-stab.h
@item DBX_PARM_SYMBOL_CLASS
@item EXTERN
buildsym.h
@item EXTRACT_RETURN_VALUE
-tm-68k.h
+tm-m68k.h
@item EXTRACT_STRUCT_VALUE_ADDRESS
values.c
@item EXTRA_FRAME_INFO
@item FRAME_GET_BASEREG_VALUE
frame.h
@item FRAME_NUM_ARGS
-tm-68k.h
+tm-m68k.h
@item FRAME_SPECIFICATION_DYADIC
stack.c
@item FUNCTION_EPILOGUE_SIZE
remote-mm.c
@item NOTICE_SIGNAL_HANDLING_CHANGE
infrun.c
-@item NO_DEFINE_SYMBOL
-xcoffread.c
@item NO_HIF_SUPPORT
remote-mm.c
@item NO_JOB_CONTROL
@code{mmalloc}. When defining @code{NO_MMALLOC}, you will also have
to override the setting of @code{MMALLOC_LIB} to empty, in the Makefile.
Therefore, this define is usually set on the command line by overriding
-@code{MMALLOC_DISABLE} in @file{config/*.mh}, rather than by defining
+@code{MMALLOC_DISABLE} in @file{config/*/*.mh}, rather than by defining
it in @file{xm-*.h}.
@item NO_MMALLOC_CHECK
Define this if you are using @code{mmalloc}, but don't want the overhead
remote-adapt.c
@item NO_SINGLE_STEP
infptrace.c
-@item NO_TYPEDEFS
-xcoffread.c
-@item NO_TYPEDEFS
-xcoffread.c
@item NPC_REGNUM
infcmd.c
@item NS32K_SVC_IMMED_OPERANDS
@item SIGTRAP_STOP_AFTER_LOAD
infrun.c
@item SKIP_PROLOGUE
-tm-68k.h
+tm-m68k.h
@item SKIP_PROLOGUE_FRAMELESS_P
blockframe.c
@item SKIP_TRAMPOLINE_CODE
@item STOP_SIGNAL
main.c
@item STORE_RETURN_VALUE
-tm-68k.h
+tm-m68k.h
@item SUN4_COMPILER_FEATURE
infrun.c
@item SUN_FIXED_LBRAC_BUG
@item BLOCK_ADDRESS_ABSOLUTE
dbxread.c
@item BPT_VECTOR
-tm-68k.h
+tm-m68k.h
@item BREAKPOINT
-tm-68k.h
+tm-m68k.h
@item BREAKPOINT_DEBUG
breakpoint.c
@item BSTRING
regex.c
@item C_GLBLREG
coffread.c
-@item DAMON
-xcoffexec.c
@item DBXREAD_ONLY
partial-stab.h
@item DBX_PARM_SYMBOL_CLASS
@item EXTERN
buildsym.h
@item EXTRACT_RETURN_VALUE
-tm-68k.h
+tm-m68k.h
@item EXTRACT_STRUCT_VALUE_ADDRESS
values.c
@item EXTRA_FRAME_INFO
@item FRAME_GET_BASEREG_VALUE
frame.h
@item FRAME_NUM_ARGS
-tm-68k.h
+tm-m68k.h
@item FRAME_SPECIFICATION_DYADIC
stack.c
@item FUNCTION_EPILOGUE_SIZE
remote-mm.c
@item NOTICE_SIGNAL_HANDLING_CHANGE
infrun.c
-@item NO_DEFINE_SYMBOL
-xcoffread.c
@item NO_HIF_SUPPORT
remote-mm.c
@item NO_SIGINTERRUPT
@item NO_SINGLE_STEP
infptrace.c
@item NO_TYPEDEFS
-xcoffread.c
-@item NO_TYPEDEFS
-xcoffread.c
+xcoffread.c--This causes types not to be read, to save memory and speed
+things up.
@item NPC_REGNUM
infcmd.c
@item NS32K_SVC_IMMED_OPERANDS
@item SIGTRAP_STOP_AFTER_LOAD
infrun.c
@item SKIP_PROLOGUE
-tm-68k.h
+tm-m68k.h
@item SKIP_PROLOGUE_FRAMELESS_P
blockframe.c
@item SKIP_TRAMPOLINE_CODE
@item STOP_SIGNAL
main.c
@item STORE_RETURN_VALUE
-tm-68k.h
+tm-m68k.h
@item SUN4_COMPILER_FEATURE
infrun.c
@item SUN_FIXED_LBRAC_BUG
indicated with a @samp{C_FILE} symbol (.file) which is analogous to
@samp{N_SO}; include files are delimited with @samp{C_BINCL} (.bi) and
@samp{C_EINCL} (.ei) which correspond to @samp{N_SOL} rather than Sun's
-@samp{N_BINCL}. The values of the @samp{C_BINCL} and @samp{C_EINCL}
-symbols are offsets into the executable file which point to the
-beginning and the end of the portion of the linetable which correspond
-to this include file (warning: C_EINCL is @emph{inclusive} not exclusive
-like most end of something pointers). Other differences from standard
-stabs include the use of negative type numbers for builtin types.
+@samp{N_BINCL} (that is, they don't nest and there is no equivalent to
+N_EXCL). The values of the @samp{C_BINCL} and @samp{C_EINCL} symbols
+are offsets into the executable file which point to the beginning and
+the end of the portion of the linetable which correspond to this include
+file (warning: C_EINCL is inclusive not exclusive like most end of
+something pointers). Other differences from standard stabs include the
+use of negative type numbers for builtin types.
The shared library scheme has a nice clean interface for figuring out
what shared libraries are in use, but the catch is that everything which