Commit Graph

1325 Commits

Author SHA1 Message Date
Eike Ziller
73bb92c5a6 Merge remote-tracking branch 'origin/4.0'
Change-Id: I89c52ca2145a43c94d3366367ba72fde605dd577
2016-05-31 12:02:13 +02:00
hjk
74b6d2e708 Debugger: Clean up GdbEngine member data on finish
Restarting with cached outdated information is problematic.

Change-Id: I396da2fef96a161c1ab150134b8e65a758a16d58
Task-number: QTCREATORBUG-16355
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-27 12:34:20 +00:00
hjk
60f092f6bb Debugger: Cosmetics
Qt 5 connects, unused declaration, QLatin1Strings, ...

Change-Id: If09929993d750907ee3f4e2fa9f18acfcc28d9c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-12 15:08:16 +00:00
Eike Ziller
9e66ce48e4 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/autotest/testcodeparser.cpp
	src/tools/clangbackend/ipcsource/clangbackendclangipc-source.pri
	tests/unit/unittest/unittest.pro

Change-Id: I9db4fbea6ea7c9fdd0d8e1703735af20c92e754b
2016-05-09 16:37:41 +02:00
hjk
3d34ccf4d9 Debugger: Enforce use of target-async for Android gdbserver
Since NDK r11 this seems to be needed to get breakpoints set
correctly on Linux and Mac.

Change-Id: I54281feecc0a915d4761228c612b72889756aecf
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-09 12:47:59 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
hjk
6d78e94b86 Debugger: Use -exec-return when asked for
Change-Id: Ib3ab40d3180494fae21040bd3337adcce7816de3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-18 10:03:20 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Orgad Shaneh
de9fc126c8 Debugger: Force GNU/Linux osabi when debugging elf on Windows
Coredump fails to open with multi-target gdb on Windows.

Change-Id: I66cea184a84539c9f56cc46d7eabadd7760ba649
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-08 14:29:23 +00:00
hjk
e9b1e493c2 Debugger: Move struct sorting logic to generic parser
Backends only have to specify whether an object members are sortable
in principle (e.g. all structs), and some numeric 'sortgroup' value
for member items (higher values are always sorted on top).

Change-Id: I10ce94580374fed48a35f058a575a1408d6801af
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-08 10:22:31 +00:00
hjk
6ed9ac35be Debugger: Do not change LANG when starting GDB
LC_NUMERIC is enough for the float reporting problem, and
LANG is too intrusive

Task-number: QTCREATORBUG-16010
Task-number: QTCREATORBUG-16024
Task-number: QTCREATORBUG-12800
Change-Id: Ia5bc31152e2b137c6b830a232460542a3827138a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-04-07 09:51:58 +00:00
hjk
bb516e49ae Debugger: Escape quotes in GDB breakpoint conditions
Task-number: QTCREATORBUG-15821
Change-Id: I81faf3d31598538c04f843694b04f938bfb61a6e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-07 09:03:06 +00:00
hjk
d27d51050c Debugger: Use kit macro expander instead of global one where possible
This is low hanging fruit enabling a lot more customization.

Change-Id: I1a90fa731ea512852c12a55fad75551efb44e875
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 08:11:47 +00:00
hjk
35a16cc394 Debugger: Make some of the plugin tests compilable again
Change-Id: I5c3885cb385dc1c15dce14f2ff52bf70edee8399
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-16 14:04:05 +00:00
hjk
af8d9b1dc7 Debugger: Adapt to Android(?) GDB 7.10's changed register format
The previous 'v4_int32' tag now shows as 'u32'. Look for either.

Change-Id: Ie47fd564ec5ee1f08f44f3fb43180f5cdc495884
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-03-15 12:06:47 +00:00
hjk
c09ebb8f13 Debugger: Re-enable retrieval of register content
Less use of magical object names.

Change-Id: I2da17f1cefe1a72f4ea8be4c041e7443265def93
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-15 08:47:21 +00:00
hjk
2cf0060596 Debugger: Use StandardRunnable in DebuggerStartParameters
This is a mechanical replacement for the former executable, processArgs,
inferiorEnvironment and workingDirectory members.

Change-Id: I4160e01427ed801df9b729f1f31d0a2ca48159b5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-28 14:15:54 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Andre Hartmann
2a59bd6514 Gdb: Use 'C' format for variable printing
On Linux systems, GDB may produce localized output of
float/double variables, which inhibits changing the
display format in Creator.

Task-number: QTCREATORBUG-12800
Change-Id: Ic042979c78319ff029f08a8766c8719c46052374
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-05 10:46:03 +00:00
Oswald Buddenhagen
5a7d3e78db Merge remote-tracking branch 'origin/3.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: Ifbe181e86c161e082cc9a69a4bc7bd399f34ff47
2016-01-04 14:11:07 +01:00
hjk
8e702387e5 Debugger: Start separating different process environments
Debugger and stub run locally, the debugged process not necessarily.

Change-Id: Ibf6aec3dcaec60069866ec0765ec2178ca0a26d6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-04 12:33:47 +00:00
Andre Hartmann
067682a25e GdbEngine: Fix typo
Change-Id: I333cee6370202ed5e9623025d484a2f5637a05c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-22 09:38:57 +00:00
hjk
c2bf384ac2 Debugger: Split DebuggerEncoding enum
... into a string specifying a kind of encoding (utf8, latin1),
an optional bytesize (2-byte integers, 4-byte integers) and a
flag whether the displayed value should get "..." around it.

Scales better than adding an enum value for each new combination.

Change-Id: Iffcb1e2f148f12da96e165559a976bd34026c649
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-21 07:32:14 +00:00
hjk
6a71c63186 Debugger: Make display of QObject names optional
... and switch it off by default. The feature has indeterministic
performance impact and lost quite a bit of its utility since GDB
learned to extract dynamic object types most of the times.

Change-Id: I22cccb03ba67f9ff6ad757bbc06eb372d84bbffe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-17 14:58:23 +00:00
hjk
f523f0291f Debugger: Fix editing values in GDB
This fixes a regression introduced in 3.6.0.

Change-Id: Ia87a8a60e43e99db9c214d95b8a89af15ea742fc
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-17 09:14:44 +00:00
hjk
6dcdba92f3 Debugger: Show a warning if Python < 2.7 is used
Execution will continue for now, but not for long.

Change-Id: I1abc57e6375e5ec4d24c7299f68f59c5bb06f3c9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-16 12:02:26 +00:00
Eike Ziller
ff60bf37c9 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8223551aec66539dd8c55262e5000c1621410334
2015-12-15 12:21:58 +01:00
Orgad Shaneh
d4d0b889a0 Debugger: Completely ignore *running message on Windows
They appear with each newly created thread, which makes them unreliable during
startup, and useless later.

On startup, we issue -exec-continue and expect running. But unrelated *running
messages appear, and the state is changed to RunOk, although exec-continue is
not done yet. This results in "UNEXPECTED STATE" error logs.

Trust only response ^running.

Change-Id: I5e75fcd19928dab83d83ca71e9497021766460e9
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-09 15:41:59 +00:00
Orgad Shaneh
cbd6985693 Debugger: Consider reason-less stop on Windows as terminal sigtrap
Task-number: QTCREATORBUG-14350
Change-Id: I1d7af5f9c91cfbe43127e06d0bb7faddded4ccf6
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-09 15:40:56 +00:00
Orgad Shaneh
0e76b99108 Debugger: Output pending commands also on non-critical timeout
Change-Id: I964c3feb8b093b0e09b5bfc73f21897ac0335bbb
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-09 11:45:03 +00:00
David Fries
aba62280ae Debugger: Fix compile for g++ 4.7.2
src/plugins/debugger/gdb/gdbengine.cpp: In lambda function:
src/plugins/debugger/gdb/gdbengine.cpp:3224:30: error: the value of 'this' is not usable in a constant expression
src/plugins/debugger/gdb/gdbengine.cpp:3210:61: note: 'this' was not declared 'constexpr'
src/plugins/debugger/gdb/gdbengine.cpp:3231:13: error: 'incmd' was not declared in this scope
This reverts one code block of commit
2b16b97f19

Change-Id: Iab7f5ec84e59d9f280e0405cdd82705c14bb2064
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-03 15:19:23 +00:00
hjk
9d6c63d4d2 Debugger: Move the 'break on qFatal' implementation to gdbbridge
Easier to create invisible breakpoints there.

Task-number: QTCREATORBUG-15276
Change-Id: I76ffa45f9f0de5ffbc3b82a7ef9a4ddcdfff62eb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-05 09:42:03 +00:00
hjk
2b16b97f19 Debugger: Make DebuggerEngine::runCommand() virtual.
Allows default implementation of e.g. stack retrieval in the base
class.

Change-Id: I96460b19aa31347b2c863736b4ce2b5046eb4de6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-11-04 11:48:05 +00:00
hjk
601f6fd819 Debugger: Rename GdbEngine::{stackListFrames->fetchStack}
Same as LLDB now.

Change-Id: I8a59a977fe45e7f523eae59cbb4cd24b78ad8e7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 10:19:05 +00:00
hjk
d5101b5d91 Debugger: Standardize on all-lowercase for protocol options
CamelCase might be more Qt-ish, but the backends tend to use
lowercase only.

Change-Id: I04b9b7305b54226f27b70151115050c4816f911f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 10:18:50 +00:00
hjk
b8ae9fd46d Debugger: Adjust native mixed debugging after upstream changes
Change-Id: I4d137fadd0de2aa346f2f49932faac4ee9ed41e7
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-19 12:40:29 +00:00
hjk
e696b6af08 Debugger: Work around libstd++ crash
Task-number: QTCREATORBUG-15183
Change-Id: I7f0d00c984bb19f025b5e2f576017e0a982ed79a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-16 05:59:26 +00:00
hjk
01006580c1 Debugger: Go back to QVector in GdbMi
We are overstretching std::vector implementations in some
cases of partial self-assignment.

Task-number: QTCREATORBUG-15183
Change-Id: I144e9e34df117286a7eef6403e29054d530cacbe
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-16 05:59:04 +00:00
hjk
ec2e01faec Debugger: Make basic native-mixed debugging work with LLDB
Change-Id: I4d55c6a486d5adbccaa93eaa1ee461238fecfea3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-13 06:49:00 +00:00
hjk
525c33f999 Debugger: Infrastructure for reworked native mixed debugging
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
  from actual reponse handling

New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.

Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-09 05:19:45 +00:00
Orgad Shaneh
c2b34fb1ef Debugger: Fix "Repeat Last Command" button
Broke by 150af7af4c.

flags must be stored with the command.

Change-Id: If2bac648d7d4b2c341eb6398d92b05660f519114
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-07 13:25:37 +00:00
hjk
150af7af4c Debugger: Merge GdbEngine's {run,post,flush}Command
Since we don't keep a local queue anymore, the distinction is
no more needed. Also, this is close to the LLDB side now.

Also move remaining uses of DebuggerCommand::flags to
GdbEngine, since that's the only user.

Change-Id: I61ae0f4e5294e306ab0b202e80f27fb3e3f7a7d7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-30 11:41:02 +00:00
Ulf Hermann
d5707e0e32 Debugger: Use Qt's JSON encoder for debugger protocol
The V4 debug service expects correct JSON as input and gdb, lldb, and
pdb expect Python object literals. There is a subset of JSON that is
also valid as Python object literals and we use that for the protocol
spoken with gdb, lldb, and pdb. The strings passed to CDB are tunneled
through JSON strings and converted to byte arrays before sending them.

Change-Id: I87319b5450e5c3c3b29c565b75cddaa612767611
Task-number: QTCREATORBUG-14931
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-09-15 08:28:14 +00:00
hjk
7d3bb6fdee Debugger: Remove some unneeded calls to resetLocation()
Since resetLocation() is called when the repective actions are
triggered immediately before the engine's executeFoo() are called
there is no need to call them in executeFoo() again.

Also, remove the unused autoContinueInferior(); function.

Change-Id: I8d2ec419c0da6efa388ce1ed317f31d24654897f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-15 06:00:25 +00:00
hjk
7ac99044e8 Debugger: Merge watcher request creation
... of {Gdb,Lldb,Pdb}Engine. Code is the same nowadays.

Change-Id: I874b1ddfd813c15cc16c9b91bd894c7c42b56e93
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-15 06:00:14 +00:00
hjk
1cb811ebe6 Debugger: Slim down CHECK_STATE() expansion
Less generated code.

Change-Id: Iafcafc875afa3ead12e10fd5f316d9663b2f9823
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-15 05:55:29 +00:00
hjk
d15cb20ee2 Debugger: Add 'override' to *Engine classes
Thanks to clang-modernize.

Change-Id: Ie1998c32d492cb458b9b4649c425c0de272ce976
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-11 08:49:42 +00:00
hjk
3ee97ef8ab Debugger: Use the usual callback mechanism for LLDB, too
... instead of the custom mechanisms to funnel breakpoint ids, cookies
and similar through individual bridge functions.

Change-Id: I2b6e906078eefdbcd4ffa166dc1881a1d0f7fb51
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-11 07:58:02 +00:00
hjk
e37b1bdfa4 Debugger: Work around lazy GDB communication
-exec-finish in 'main' results (correctly) in something like
 40^error,msg="\"finish\" not meaningful in the outermost frame."
However, this message does not seem to get flushed before
anything else happens - i.e. "never". So force some extra output
that's known to trigger a flush.

Change-Id: I3f5ef6f7cc57dd085976b239f18d6ec7bd108972
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-02 06:44:57 +00:00
hjk
cda1f94b18 Debugger: Remove queued commands in GDB engine
Instead, always pipe them into the GDB process, even if the inferior
is not stopped. The original need to hold back commands until
the inferior is stopped seems to be long gone.

Change-Id: I234fdd067d78966c9896f1fa85a134900bf6dec7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-01 06:57:29 +00:00