QtCreator Build Gdb: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=Building <span class="caps">GDB</span>=
[[Category:Tools::QtCreator]]
== For Windows ==


==For Windows==
A msys Environment with MinGW is required to build the GDB on Windows.
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.


A msys Environment with MinGW is required to build the <span class="caps">GDB</span> on Windows. <br /> 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] ''[sourceforge.net]'' 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>
 
=== Building on RHEL 6.6 ===


===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>


* Extract qtcreator-gdb-&lt;gdb version&gt;-&lt;host&gt;.tar.gz
* 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


==Testing==
==Shipping==


* To test <span class="caps">GDB</span> just run the executable and type:<br />
* Extract qtcreator-gdb-<gdb version>-<host>.tar.gz
* When the <span class="caps">GDB</span> prints “23” everything works fine.


==Downloads==
== Testing ==


* [http://download.qt.io/development_releases/prebuilt/gdb/ <span class="caps">GDB</span> 7.5 binaries] ''[download.qt.io]''
* To test GDB just run the executable and type:
* [http://download.qt.io/development_releases/prebuilt/gdb/build-prerequisites/python.zip Compiled python for Windows] ''[download.qt.io]''
<code>
python print(23)
</code>
* When the GDB prints "23" everything works fine.


===Categories:===
== Downloads ==


* [[:Category:Tools|Tools]]
* [http://download.qt.io/development_releases/prebuilt/gdb/ GDB 7.5 binaries]
** [[:Category:Tools::QtCreator|QtCreator]]

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