________________________________________
_/_ _\_
__/__/ TDM-GCC Compiler Suite for Windows \__\__
| « « | GDB 7.9 Series | » » |
¯¯\¯¯\ MinGW-w64 64-bit Edition /¯¯/¯¯
¯\¯ ¯/¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
THIS IS THE README FOR THE 64-BIT GDB (DEBUGGER) DISTRIBUTION PROVIDED BY TDM-GCC. PLEASE SEE THE FILE "README-gcc-tdm64.md" FROM THE TDM64 CORE PACKAGE FOR GENERAL NOTES ABOUT 64-BIT TDM-GCC.
This edition of GDB is a 64-bit native build for Windows hosts. It is designed to debug 64-bit Windows (PE+) binaries generated by GCC. It is tested with TDM-GCC, but should also be able to debug binaries from other GCC toolchains that target 64-bit Windows, without any issues.
REPORTING BUGS:
TDM-GCC's GDB packages incorporate wrapper executables and auto-executing Python code to load libstdc++ pretty printers. If you encounter a bug relating to one of these, please file a report at: https://github.com/jmeubank/tdm-binutils-gdb/issues
Otherwise, bug reports should be directed to Sourceware: http://www.gnu.org/software/gdb/bugs/
Using the TDM-GCC installer is highly recommended; it can automatically install TDM's GDB (or the official MinGW GDB) as well as all supplementary base system packages. The installer uses a standard wizard interface with reasonable defaults.
Download the GDB archive (provided in .zip or .tar.xz format) and unpack it to the location of your choosing. It's recommended that you choose a path with no spaces in the folder names. This GDB edition is designed to cooperate with other executables in a standard POSIX-on-Windows installation tree if desired.
Support for GDB is primarily provided by the official GDB project: http://www.gnu.org/software/gdb/
However, for GDB on 64-bit Windows the MinGW-w64 project often has the direct, specific knowledge needed to solve problems (particularly, the mailing list): http://mingw-w64.sourceforge.net/
Because a 64-bit GDB can't locally debug a 32-bit target program, and a 32-bit GDB can't locally debug a 64-bit target program, TDM now provides both a 32-bit and a 64-bit edition of GDB. Each edition comes with one or more wrapper executables. This allows the differently-named wrappers to coexist in the toolchain's normal "bin" directory, while keeping the actual GDB executables in separate subdirectories.
-
The 32-bit GDB wrapper is
bin/gdb32.exe
, and the actual executable it wraps isgdb32/bin/gdb32.exe
. -
The 32-bit GDBSERVER wrapper is
bin/gdbserver32.exe
, and the actual executable it wraps isgdb32/bin/gdbserver32.exe
. -
The 64-bit GDB wrappers are
bin/gdb.exe
andbin/gdb64.exe
, and the actual executable they wrap isgdb64/bin/gdb.exe
. -
The 64-bit GDBSERVER wrappers are
bin/gdbserver.exe
andbin/gdbserver64.exe
, and the actual executable they wrap isgdb64/bin/gdbserver.exe
.
Thus, the "default" GDB you get from running the toolchain bin directory's gdb.exe is the 64-bit GDB. However, feel free to delete it and copy gdb32.exe as gdb.exe instead, if you prefer 32-bit to be your default.
In order to provide a python-enabled GDB (for the many integrations it offers with integrated development environments), but alleviate the burden of forcing every user to install Python on their own, the TDM64 GDB package includes a 64-bit Python 3 installation. By default GDB will load with and use this bundled Python.
If you have a different Python installation that you would prefer TDM GDB to use, you need to:
- Set the
%PYTHONHOME%
environment variable to point to that installation, - Make sure the
%PATH%
environment variable includes that installation's Python DLL (often the DLL is installed to C:\Windows\System32, already in%PATH%
), and - Rename or delete
python39.dll
from the gdb64/bin directory.
GCC provides a set of Python "pretty printers" for libstdc++ objects in GDB. TDM GDB includes a Python script called "gdbinit" that automatically runs whenever GDB starts -- this script searches for the most recent version of the libstdc++ pretty printers in the toolchain "share/gcc-*/python/libstdcxx/v6" path and, if found, loads them for you.
If you would prefer not to auto-load the libstdc++ pretty printers, you can rename or delete the gdbinit script file.
The GDB package is a binary distribution licensed under the GPLv3; see "COPYING3-gdb-tdm.txt". It is additionally based on the Expat XML Parser, whose license is available in "COPYING-expat.txt"; on the "winpthreads" compatibility library, whose license is available in "COPYING.winpthreads.txt"; on the ncurses text user interface framework, whose license is available in COPYING-ncurses.txt; and finally it includes a copy of the Python DLL and base libraries, licensed under the terms in LICENSE-python.txt.