QtCreator Build Gdb: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Tools::QtCreator]]
[[Category:Tools::QtCreator]]
[toc align_right="yes" depth="3"]
= Building GDB =
== For Windows ==
== For Windows ==


A msys Environment with MinGW is required to build the GDB on Windows.
A msys Environment with MinGW is required to build the GDB on Windows.
If it is missing "download":http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/mingw-get-inst-20120426.exe/download and install it to your system.
If it is missing [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/mingw-get-inst-20120426.exe/download download] and install it to your system.


== Building ==
== 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
* Go to qt-creator/dist/gdb
* The directory has 3 Makefiles: '''linux''', '''osx''' and '''mingw'''. Use the one that corresponds to your host os.
* 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.
* In case you need additional targets, edit the line starting with 'targets=' in the Makefile.
* Run: <code>make -f Makefile.<linux|osx|mingw><code>
* Run: <code>make -f Makefile.<linux|osx|mingw></code>


=== Building on RHEL 6.6 ===


h3. Shipping  
* install devtoolset-3
<code>
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
</code>
 
* 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
* Extract qtcreator-gdb-<gdb version>-<host>.tar.gz
Line 24: Line 43:


* To test GDB just run the executable and type:
* To test GDB just run the executable and type:
<code>
python print(23)
</code>
</code>
python print 23
<code>
* When the GDB prints "23" everything works fine.
* When the GDB prints "23" everything works fine.


== Downloads ==
== Downloads ==


* "GDB 7.5 binaries":http://download.qt.io/development_releases/prebuilt/gdb/
* [http://download.qt.io/development_releases/prebuilt/gdb/ GDB 7.5 binaries]

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