Commit Graph

1081 Commits

Author SHA1 Message Date
Kai Koehne
cb857b47a2 Debugger: Change default gdb engine breakpoint "path usage" to "full"
Setting breakpoints by file name and line does not work robustly when
using gdb, with neither the full path, nor with just the baseline. Since
typically one of the options work, Creator offers a per-breakpoint choice
of which approach to use. Traditionally, using the full path broke more
often, so the default was "short". Lately (gdb 7.3+) using the full path
seems to be more robust, so the default should be changed. Manual
overriding to "short" is still possible.

Change-Id: I9e857c86a63964bdacf9bebc5444ea752e5974f8
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-25 18:08:22 +02:00
hjk
ed890bc940 Debugger: Move dockwidget object names into a more private place
Change-Id: I5a3565179fdd8627387ba01370e6484d668e2160
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-23 17:36:36 +02:00
hjk
4d6ce81e0c Debugger: Don't scan directories that do not exist.
Change-Id: Ie79249039643041fd68da6766b0e6f3ca6080b86
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-19 15:26:43 +02:00
hjk
5b98167ebd Debugger: Remove common bridge.py
The engines know what they want, no need to guess again.

Change-Id: Ie21b0e08eff8b81b217a08d4c47c35c35ae831d7
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-11 18:17:21 +02:00
hjk
17e8631dfb Debugger: Reorganize python dumper loading
- Split off GDB and LLDB specific parts into separate files,
- Trigger loading of dumpers.py and qttypes.py from bridge.py
- Read start up script at startup, not as part of dumper loading

Change-Id: I7941ee535121fa0f43a466e5bb75a18c9bb19764
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-10 15:58:12 +02:00
hjk
87f2d83ec2 Debugger: Add basic breakpoint handling and stepping to LLDB backend
Change-Id: Ib700afa63739e6d26bdd97225265559d7112eadb
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-10 15:58:02 +02:00
Eike Ziller
65654e4a50 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/android/androidrunner.cpp
	src/plugins/clearcase/clearcasesync.cpp
	src/plugins/fakevim/fakevimhandler.cpp
	tests/auto/ioutils/ioutils.pro

Change-Id: I31587b8a4dd6aacc1e76803159da51a972878370
2013-04-08 13:26:37 +02:00
hjk
066efcd6a6 Debugging on Android
This implements the host side of
https://codereview.qt-project.org/#change,50290

Change-Id: I13c7df29534a2a85202c2b295b139896443b0120
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-08 12:05:44 +02:00
hjk
6bb0024140 Debugger: Make adding tasks for missing debug info packages optional
Task-number: QTCREATORBUG-8949
Change-Id: If0cf1c1078a72a3e4a3d371d236bacac858b8046
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 13:51:25 +02:00
Friedemann Kleint
01d4fe8520 Remove internal class BaseTextMarkRegistry from exported header.
Change-Id: Ieeffe65be2d7c8f07f41f7211853d616a6aceb85
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-03-26 17:03:08 +01:00
Friedemann Kleint
85d12bb409 Clean headers in debugger plugin.
Change-Id: Ia50e61a82101b699390b23b4f1ea9509619314bb
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-22 10:00:00 +01:00
hjk
e14bbccb04 Debugger: Add an option to import plain gdb pretty printers
This enables the use "official gdb"-styly pretty printers from
within Creator. In case there are both variants, Creator-style
pretty printers are preferred.

Change-Id: Iaa178d922dae4eaa1943e9d5b960a666f80fe4db
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-22 08:31:59 +01:00
hjk
e1c4f12de4 Debugger: Split GDB option pages into two
It's getting crowded...

Change-Id: I24c1a87b013af485743573df7669739ad93f8a89
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-22 08:31:41 +01:00
Eike Ziller
3bc622400d Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/debugger/gdb/gdbengine.cpp

Change-Id: Ic8590ad97d7349ed7601a49c4fd873ffc9a5f9b5
2013-03-12 10:56:52 +01:00
Friedemann Kleint
056e8aa4c2 Fix some Krazy warnings about non-const ref iterator.
Change-Id: I1c78f5f5a7174002cd25bea109d5fe795530cdb5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-11 17:31:07 +01:00
hjk
82648e652e Debugger: Split out sub-breakpoint parsing
This is in anticipation of a change of behavior break in the GDB/MI
protocol, see http://permalink.gmane.org/gmane.comp.gdb.patches/83936.

Change-Id: I135c0a342da1fed13aaedfd9e27499d5ad892c5a
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-03-08 16:36:38 +01:00
David Schulz
e03f7da72b CDB: Warn on release build.
Task-number: QTCREATORBUG-8820

Change-Id: If48429fc80d3b928cba4622ff6b168dca8289500
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-06 07:41:50 +01:00
hjk
1566582a8c Debugger: Disable DebugInfoTaskHandler
This only worked for distributions with a RedHat/Fedora upstream
so far and requires more dynamicity in the TaskWindow as the
TaskHandler dies with the engine, leading to crashs.

Change-Id: I20d0b3c79e4fd0026cd2a0c9ff5b0a4be22c3121
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-27 17:11:51 +01:00
hjk
444c5ae11c Debugger: Fix setting of some disabled breakpoints
As we disable of 'by-address' breakpoints by default after each
debugger run as they are unlikely to be correct on the next run,
starting with disabled breakpoints might happen. Disabling it
immediately is faster and less racy than relying on the 'change
needed' mechanism.

Change-Id: Icc5548d322f7ef4f099d218b4f04b4c40e3cb850
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-02-26 15:04:45 +01:00
hjk
66c51cd326 Debugger: Set ignore count on breakpoint creation
This avoids a problem when setting the ignore count on a pending
breakpoint.

Task-number: QTCREATORBUG-8809
Change-Id: I8cdeb9c525de33336a21c739c6dc99f824f6fe7a
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-02-26 12:52:11 +01:00
hjk
5d0440a40a Debugger: Set conditions on breakpoints immediately
Modern versions of gdb support this and it avoids a nasty
endless loop when setting a condition on a breakpoint in
a non-existing file.

Change-Id: Id3a03a44c016f85617bb1e74a4843b1b398c490f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-02-16 15:14:31 +01:00
Aurindam Jana
677edc30dc Debugger: Add a field for source path map in DebuggerStartParameters
Change-Id: Ie79cdcd5c32a2204ac4b701c253d6d76bd271272
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-07 13:03:11 +01:00
hjk
dc5a2d6b18 Debugger: consolidate WatchData manipulation in watchdata.{h,cpp}
Change-Id: I241d37793dfde9cfe8e4895039819e91297e6cba
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-01 13:57:47 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
hjk
4622aba79e Debugger: Fix triggering display of threadnames
This is a recent regression introduced by the delayed python dumper
initialization.

Task-number: QTCREATORBUG-8615
Change-Id: I3b5dbe5b04c68cf873e3a2597edc60fe2888b3c9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-01-31 16:20:47 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Oswald Buddenhagen
f1cec4629e Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/libs/utils/tooltip/tips.cpp
	src/plugins/coreplugin/versiondialog.cpp
	src/plugins/projectexplorer/kitinformationconfigwidget.cpp
	src/plugins/qnx/blackberryapplicationrunner.cpp
	src/plugins/qnx/blackberrydeployconfiguration.cpp
	src/plugins/qnx/blackberrydeployconfiguration.h
	src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp

Change-Id: I7886ec971942d9e0a9da237dcf4ceb1687abd71b
2013-01-29 15:52:36 +01:00
hjk
b6f187d0f2 Debugger: split editor related code off watchutils.{h,cpp}
This is now in sourceutils.{h,cpp} to make watchutils.{h,cpp}
better acessible to the debugger auto-tests.

Change-Id: Ie87e715bc7018ca190a460c37dfd19bc897059f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-25 13:54:34 +01:00
hjk
e52a35a239 Debugger: rename gdb/gdbmi.{h,cpp} into debuggerprotocol.{h,cpp}
The scope is a bit broader nowadays.

Change-Id: I9578da94f06df199be5668c1751fd7bfb37f1c5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-24 11:05:36 +01:00
hjk
fbb197655b Debugger: correct typos in comment
Change-Id: I3211a696c65f500b8e7d7c4ce394788773ce5713
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-17 17:02:35 +01:00
hjk
e2f86d9e48 Debugger: Speed up disassembly retrieval
This skips the case of "disassembling a function given an address"
with indeterministic time behaviour and and immediately falls back
to the fixed range version instead.

Change-Id: I90ec56198a7d767bcf0a9ffb030637c2ee5c617a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-17 16:59:34 +01:00
hjk
8a805c2e90 Debugger: Add "Reload Debugging Helpers" to Log Window context menu
Change-Id: I5059dbf73482236a677de8c004ab33aaef3d4cd6
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-10 14:37:40 +01:00
hjk
885f8b34cf Debugger: Move python initialization after first stop
This enables access to object-specific plain gdb pretty printers
which are not available before startup.

Change-Id: Icc8cbec177825d4d1adb1957a618abb33cbbf319
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-09 17:26:36 +01:00
hjk
2a0bb34911 Debugger: split fixCppExpression into some common and some cdb part
Task-number: QTCREATORBUG-8446
Change-Id: I79abc7f75779db15bd8700c085b9cd57411bb2e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-09 16:02:46 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
Friedemann Kleint
033f211a10 Windows compile fix.
e8b5c6dfcca3fc139049136b42459e7840efed7 :
Provide terminal emulator functionality in ConsoleProcess for
Windows as well.

e833b794b3 :
Use Core::Id().

Change-Id: Idad2bd2180e9a5dd2d1266496e340726435835d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-12-29 20:55:03 +01:00
hjk
e833b794b3 Use Core::Id in ICore::showOptionsDialog
Change-Id: I3865fde2347d687a7dee76dd5ca62db69cc4dd04
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:04:30 +01:00
hjk
82f9de4af0 Use Core::Id for settings category in showWarningWithOptions
Change-Id: Ie296816c271efabfb7a046c176bc33ebde6f6454
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:03:21 +01:00
Friedemann Kleint
c6c658bb4f Debugger: Fix break at qWarning()/qFatal() for Qt 5.
Use the same setting in CDB, move it to common settings page
in a follow-up commit.

Change-Id: I67d6cd706f658c616a431e9d518d52e020afa54c
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-20 17:32:04 +01:00
Marcus Folkesson
b9ca111ab1 debugger: gdb: Use RemoteGdbServerAdapter for StartRemoteProcess mode
The RemoteGdbServerAdapter should be invoked (instead of
LocalPlainGdbAdapter) when using startmode StartRemoteProcess.

Change-Id: I0f4c9dc2a275ef4b42ddf5b425b8dee839c83458
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
(cherry picked from commit 0b121abb5e)
2012-11-17 17:36:36 +01:00
hjk
3685ce7599 debugger: make string cutoff value configurable
Change-Id: I118016956a597ad689daa438f5517a47efe3cef0
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-16 13:59:47 +01:00
hjk
264fe4aebb debugger: add option to use intel-style disassembly
Change-Id: I549981e8314b52fafe2da387a0bb6312670578fa
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-09 20:58:37 +01:00
hjk
33468e3549 Debugger: add a new bool setting to follow all branches after fork
Currently unused.

Change-Id: Ic751de17bf43749a135b353c0b916371174b35f8
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-09 11:44:38 +01:00
hjk
6841976aa8 debugger: give access to the section names in a shared object
Via context menu in the modules view, gdb-only for now.

Change-Id: I1163540cd9894c52243bb1bf0c2afc881e793863
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-09 11:44:22 +01:00
hjk
6c6400b7b8 debugger: don't rely on set breakpoint always-inserted on
Change-Id: Ifb80645665508a876683f338b9a022e1502feafa
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-09 11:44:04 +01:00
Marcus Folkesson
0b121abb5e debugger: gdb: Use RemoteGdbServerAdapter for StartRemoteProcess mode
The RemoteGdbServerAdapter should be invoked (instead of
LocalPlainGdbAdapter) when using startmode StartRemoteProcess.

Change-Id: I0f4c9dc2a275ef4b42ddf5b425b8dee839c83458
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-05 16:18:13 +01:00
Friedemann Kleint
41a5461cf2 Debugger: Log exceptions in build pane.
- Introduce constants for task categories, add "RunTime".
- Log exceptions under "RunTime".
- Clear pane on debugger start.
- Add 'first chance'

Task-number: QTCREATORBUG-8141
Change-Id: Icf68def06c42a0f3bb86dcc2ae74750b5397ca52
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-02 16:22:12 +01:00
Friedemann Kleint
2e40c54ea3 Debugger: Remove #ifdef Q_OS_WIN from hostutils.
- Provide stubs for Non-Windows
- Reduce #ifdefs, check Abi if possible.
- Remove unused winGetCurrentProcessId().

Task-number: QTCREATORBUG-8141
Change-Id: I80558ca4e52e87c7371597ea07c091af08097b34
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-02 15:40:41 +01:00
hjk
e35d71085c debugger: switch to another thread if the current one is dead
Change-Id: I5d7d4a6c6430487296bfc32cdb00dd40d50a025b
Reviewed-by: Matthias Blaicher <matthias@blaicher.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-24 21:43:41 +02:00
hjk
0d9a56ab3f Debugger: Rework thread data aquisition
Listen to gdb/MI notifications when possible. This is more
granular, gives access to the thread group id and takes
care of thread changes at any time.

Change-Id: I8c67f6f19b204059deefdf7e07fe3b4ce13ed963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-23 19:35:14 +02:00