QtCreator Build Gdb: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 12: Line 12:
as the "System GDB" typically meets those requirements.
as the "System GDB" typically meets those requirements.


== Building on systems without suitable System GDB ==
=== Building on systems without suitable System GDB ===


* Go to qt-creator/dist/gdb
* Go to qt-creator/dist/gdb
Line 19: Line 19:
* Run: <code>make -f Makefile.<linux|osx|mingw></code>
* Run: <code>make -f Makefile.<linux|osx|mingw></code>


== Building on RHEL 6.6 ==
=== Building on RHEL 6.6 ===


* install devtoolset-3
* install devtoolset-3
Line 36: Line 36:
* Create (or clone existing) kit in Tools->Options->Build and Run, Kits. Select your new debugger as Debugger
* Create (or clone existing) kit in Tools->Options->Build and Run, Kits. Select your new debugger as Debugger


 
==Shipping==
 
===Shipping===


* Extract qtcreator-gdb-<gdb version>-<host>.tar.gz
* Extract qtcreator-gdb-<gdb version>-<host>.tar.gz

Latest revision as of 12:36, 16 September 2015

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.

Downloads