QtCreator Build Gdb
Jump to navigation
Jump to search
For Windows
A msys Environment with MinGW is required to build the GDB on Windows. If it is missing download and install it to your system.
Building
Minimum requirement is a GDB 7.4 (or later) with built-in scripting using Python 2.7 or 3.x.
Manually building GDB should generally not be needed in any recent setup, as the "System GDB" typically meets those requirements.
Building on systems without suitable System GDB
- Go to qt-creator/dist/gdb
- The directory has 3 Makefiles: linux, osx and mingw. Use the one that corresponds to your host OS.
- In case you need additional targets, edit the line starting with 'targets=' in the Makefile.
- Run:
make -f Makefile.<linux|osx|mingw>
Building on RHEL 6.6
- install devtoolset-3
yum install ncurses-devel python27-python-devel
wget ftp://sourceware.org/pub/gdb/releases/gdb-7.7.tar.gz
tar xfvz gdb-7.7.tar.gz
cd gdb-7.7
export LIBS=-L/opt/rh/python27/root/usr/lib64/
./configure --prefix=/home/bld-qt/gdb-install --with-python=/opt/rh/python27/root/usr/bin/python2.7
make
make install
- Add /home/bld-qt/gdb-install/bin/gdb under Tools->Options->Build and Run, Debugger in Qt Creator
- Create (or clone existing) kit in Tools->Options->Build and Run, Kits. Select your new debugger as Debugger
Shipping
- Extract qtcreator-gdb-<gdb version>-<host>.tar.gz
Testing
- To test GDB just run the executable and type:
python print(23)
- When the GDB prints "23" everything works fine.