GDB Internals

Node:Support Libraries, Next:Coding, Previous:Native Debugging, Up:Top

## Support Libraries

### BFD

BFD provides support for GDB in several ways:

identifying executable and core files
  BFD will identify a variety of file types, including a.out, coff, and several variants thereof, as well as several kinds of core files.
access to sections of files
  BFD parses the file headers to determine the names, virtual addresses, sizes, and file locations of all the various named sections in files (such as the text section or the data section). GDB simply calls BFD to read or write section x at byte offset y for length z.
specialized core file support
  BFD provides routines to determine the failing command name stored in a core file, the signal with which the program failed, and whether a core file matches (i.e. could be a core dump of) a particular executable file.
locating the symbol information
  GDB uses an internal interface of BFD to determine where to find the symbol information in an executable file or symbol-file. GDB itself handles the reading of symbols, since BFD does not "understand" debug symbols, but GDB uses BFD's cached information to find the symbols, string table, etc.

### opcodes

The opcodes library provides GDB's disassembler. (It's a separate library because it's also used in binutils, for `objdump`).

### readline

### mmalloc

### libiberty

### gnu-regex

Regex conditionals.

`C_ALLOCA`
`NFAILURES`
`RE_NREGS`
`SIGN_EXTEND_CHAR`
`SWITCH_ENUM_BUG`
`SYNTAX_TABLE`
`Sword`
`sparc`

### include