B.1 Requirements for Building gdb
Tools/Packages Necessary for Building gdb
- ISO C90 compiler
- gdb is written in ISO C90. It should be buildable with any working C90 compiler, e.g. GCC.
Tools/Packages Optional for Building gdb
gdb can use the Expat XML parsing library. This library may be
included with your operating system distribution; if it is not, you
can get the latest version from http://expat.sourceforge.net.
The configure script will search for this library in several
standard locations; if it is installed in an unusual path, you can
use the --with-libexpat-prefix option to specify its location.
Expat is used for:
- Remote protocol memory maps (see Memory Map Format)
- Target descriptions (see Target Descriptions)
- Remote shared library lists (see Library List Format)
- MS-Windows shared libraries (see Shared Libraries)
- gdb will use the zlib library, if available, to read
compressed debug sections. Some linkers, such as GNU gold, are capable
of producing binaries with compressed debug sections. If gdb
is compiled with zlib, it will be able to read the debug
information in such binaries.
The zlib library is likely included with your operating system distribution; if it is not, you can get the latest version from http://zlib.net.
- gdb's features related to character sets (see Character Sets) require a functioning
iconvimplementation. If you are on a GNU system, then this is provided by the GNU C Library. Some other systems also provide a working
On systems with
iconv, you can install GNU Libiconv. If you have previously installed Libiconv, you can use the --with-libiconv-prefix option to configure.
gdb's top-level configure and Makefile will arrange to build Libiconv if a directory named libiconv appears in the top-most source directory. If Libiconv is built this way, and if the operating system does not provide a suitable
iconvimplementation, then the just-built library will automatically be used by gdb. One easy way to set this up is to download GNU Libiconv, unpack it, and then rename the directory holding the Libiconv source code to libiconv.