Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
QtCreator Build Gdb: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Tools::QtCreator]] | [[Category:Tools::QtCreator]] | ||
== For Windows == | == For Windows == | ||
Line 9: | Line 6: | ||
== 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 | * 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 === | |||
* 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 44: | ||
* To test GDB just run the executable and type: | * To test GDB just run the executable and type: | ||
<code> | <code> | ||
python print 23 | python print(23) | ||
</code> | </code> | ||
* When the GDB prints "23" everything works fine. | * When the GDB prints "23" everything works fine. | ||
Line 30: | Line 50: | ||
== Downloads == | == Downloads == | ||
* | * [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.