Commit Graph

1154 Commits

Author SHA1 Message Date
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
Eike Ziller
70b5e1f64d Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Id870f70aa35c232dbbd455f83429bab80f266c2d
2012-10-16 17:42:10 +02:00
hjk
1982a3b5a5 debugger: ignore new cmd-param-changed notification
Might be useful in the future. Not now.

Change-Id: I7255df2d56b477aaf30ebf4b9823f12e8713931c
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-16 16:54:44 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
db4311d5b5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	dist/gdb/Makefile.osx
	src/libs/qmldebug/qmldebug.qbs
	src/plugins/android/androidsettingswidget.cpp

Change-Id: I85627130b575f7d08f416dea52031fa72019b217
2012-10-04 12:23:39 +02:00
Leena Miettinen
e06582731e UI text: fix capitalization for debugger strings
Change-Id: If70418319529f75e893f3d5b60cb7dfa6a739dca
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-01 15:08:01 +02:00
Eike Ziller
a55d47544a Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.qbp
	src/plugins/qtsupport/baseqtversion.cpp
	src/tools/tools.pro

Change-Id: I43c391328ae747b3dc566f9db2384fedc1a6d0a5
2012-09-26 10:01:04 +02:00
hjk
aa8602e1e8 debugger: fix color for changed items in locals and expressions view
Change-Id: I93905f8e97e2738590fecf41ac7294c2f6872335
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-21 17:48:31 +02:00
Eike Ziller
5ac721dd58 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbp
	src/libs/utils/utils.pro

Change-Id: I6f0aba746f915d8c51dcf9372f7d9f593562fc2b
2012-09-11 14:02:03 +02:00
hjk
61291e9421 debugger: fix Qt namespace recognition for Qt 5
The "magic" symbol was QString::fromAscii, which might be fully inlined
in Qt 5. Use QString::fromAscii_helper instead, and also make the detection
a bit more robust in case the magic symbol is not found.

Change-Id: I99e61797356a0d90467d32e54acc2d2a104d609a
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-07 15:17:38 +02:00
Christian Kandeler
3c6f76d16c HostOsInfo: Add some more useful abstractions.
Namely:
- path list separator
- executable suffix
- file name case sensitivity

All of these are duplicated in various places in the current Creator
code.

Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-05 13:54:48 +02:00
Eike Ziller
a225e5b867 Merge remote-tracking branch 'origin/2.6' 2012-09-03 09:08:49 +02:00
Friedemann Kleint
6886e485de Handle watching/tooltips of C++ editor tokens consistently.
For editor tooltips and the editor context menu
'Watch expression', always try to find a local variable first
and use its expression.

Change the tooltip manager/widgets not to rely on the debugger
model enum and obscure expression, filter by complete iname
instead. Remove obsolete enumeration.

Change gdb's handling of tooltips such that local variables
are displayed immediately without creating additional tooltip
items.

Change-Id: I9b55823428029ba50d84d3a8cab55eb58942e72b
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-03 09:02:56 +02:00
Eike Ziller
25dea9a393 Merge remote-tracking branch 'origin/2.6' 2012-08-31 09:28:19 +02:00
Friedemann Kleint
e67e58378d Debugger: Use gdb's tooltip expression fixup for CDB and editor.
Factor out to watchutils.

Change-Id: I8cf316be819d765dcea964ac6405bfa9b075de59
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-31 08:56:22 +02:00
Oswald Buddenhagen
a32e243e61 Merge branch '2.6'
Conflicts:
	src/libs/utils/consoleprocess_unix.cpp

Change-Id: I196f61e882bfce94e165d9c724bffee9df1011b7
2012-08-30 20:43:02 +02:00
Friedemann Kleint
3e0950bd86 Debugger: Fix Windows terminal execution.
The console trap seems to cause a spurious "* stopped"
message without reasons in gdb 7.4. Ignore once.
Fix warnings about empty file names in cleanupFullName()
for assembly frames.
Ignore "* running" in state InferiorSetupRequested, which
occurs for Windows terminals.

Task-number: QTCREATORBUG-7770
Change-Id: Ief6dff4a946eea1b1489caddf8748fb10a647dad
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-30 12:04:34 +02:00
Friedemann Kleint
3797595c31 Fix 'Attach Debugger' in output pane.
Bring back the slot, suppress a warning about empty binaries
in the release check.

Task-number: QTCREATORBUG-7677
Change-Id: I2f1703b38b68995a1e2533ed8a6c94985cc3b430
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-30 11:53:35 +02:00
Ryan May
2cf04cb248 Fix register view with GDB.
Because missing registers are discarded, the register number returned by
GDB (when values are obtained) are not the same as the indices into the
internal list of registers. Explicitly store this mapping now.

Task-number: QTCREATORBUG-7468
Change-Id: Ica6fc6e6bd0a240cbd59923e4cabc7127e1aad8b
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-30 09:10:23 +02:00
Christian Kandeler
e669f05406 Utils: Introduce HostOsInfo class.
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.

Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 17:00:03 +02:00
hjk
a120210cdf debugger: simplify escapeCString
There was no real need for the QString based version after all.

Change-Id: I3ea64ba03164c97205fe5ee545fb53ebf44c7535
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-24 13:38:23 +02:00
Friedemann Kleint
5b69bee198 Use QT_NO_CAST_FROM_ASCII for debugger plugin.
Fix gdmi escape routine by using a traits class to adapt
QByteArray/QString.

Change-Id: Ic6d2a0c927e4613aec9f69095bbb04a393e9edb9
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-24 09:46:25 +02:00
Alessandro Portale
ae23d50576 Removal of Symbian support
Qt Creator's support for Symbian was at its peak in version
2.4.x. Nobody really verified it in Qt Creator 2.5 or 2.6.
It is most likely rotten. Let's remove it!

Also, the Symbian support code was spread throughout the whole
Qt Creator code base. The plugin interfaces evolved in the
meantime and target platforms like Android or QNX have 99% of
their code in separate plugins.

In case anyone wants to revive Symbian support in Qt Creator,
please create a plugin for it.

Change-Id: I56a758a3e2fd5b8c64d9aeb8f63d8e916c4883be
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
2012-08-22 13:42:42 +02:00
hjk
ab6330abe7 debugger: remove outdated inactive code
Change-Id: I167a04c3500d0cb4bea1b5390c8920b93fc72ad0
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-22 08:44:53 +02:00
hjk
dd6604eef2 debugger: use *running instead of ^running as running notification.
This is closer to internal gdb state. There are still a few workarounds
for gdb < 7.0 which probably should be dropped as BFD 2.18.50.20080226
yields "assertion fail elf32-i386.c:366" on stock Ubuntu 12.04 gcc,
so stock gdb 6.8 cannot be used with that compiler anyways.

Change-Id: I22c4e0ce91f634cc171d65f0ad07d68d679af10c
Reviewed-by: David Schulz <david.schulz@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-21 16:28:44 +02:00
hjk
f671a58c79 debugger: add support for temporary breakpoints
Change-Id: I841c37d21932da0ef354dbbe2fd75cec2fae86d6
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-21 15:37:43 +02:00
hjk
7ec492f6ed debugger: allow state transitions stopped->stopped unconditionally
This is triggered by the cross-qml-c++ stepping machinery (and was
already allowed there) and get also triggered by a 'continue' in
commands attached to a breakpoint as there there is no intermediate
^running to which the state engine reacts. So this is a band aid.
Better solution would be to have the state following the *running,
and per-thread run/stop state.

Change-Id: If0f1c00e8010aa099ec5da214db95e93aa37279e
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-21 12:08:46 +02:00