Commit Graph

517 Commits

Author SHA1 Message Date
hjk
8f1a161c64 Debugger: Merge EngineSetup and InferiorSetup start phases
It was needed in the past to trigger e.g. gdbserver setup in
remote cases which is nowadays handled by separate RunWorkers.

Change-Id: I30bce071dab0779cce2e7abef7b31550d8539461
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-06 13:30:04 +00:00
David Schulz
d2784c6805 Debugger: Set inferior device when attaching to running application
The device is needed to properly interrupt the inferior with cdb.

Change-Id: I96f3a7393770be9821d8edd7123c458399d4494a
Task-nnumber: QTCREATORBUG-19253
Reviewed-by: hjk <hjk@qt.io>
2017-11-13 11:25:42 +00:00
Orgad Shaneh
175afabbd7 Cdb: Do not crash if no device is set
It still fails with a soft assertion, but at least doesn't crash.

Task-number: QTCREATORBUG-19160
Change-Id: I3779f64e752abf9d3779219552a4a1be648f1dea
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-25 13:27:19 +00:00
David Schulz
b248953247 Debugger: Fix attaching to running process with cdb
Do not add inferior command line arguments to the cdb process if we are
attaching to an already running process.

Task-number: QTCREATORBUG-19034
Change-Id: I7b9a98b790e819fc76ff4ec75769785741bfde83
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 07:55:24 +00:00
hjk
d3c1dfe45a Debugger: Consolidate CdbEngine::startEngine()
Change-Id: I92c74b96c891bb46b7ceb9c45ffea268a223b325
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-13 12:32:20 +00:00
hjk
1a1c9bf828 Debugger: Use shared TerminalRunner also for CDB
Change-Id: I2dd9b16f5699d0551a2de3e8ebefc865b98ad862
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-13 12:31:31 +00:00
hjk
82e0eefc8d Debugger: Move static type related code to CdbEngine constructor
Change-Id: I5d5489030eab9c16385df9af15f5974eaa2190e0
Reviewed-by: hjk <hjk@qt.io>
2017-10-05 09:02:32 +00:00
hjk
d0e419e02b Debugger: Move some CdbEngine member initialization
More concise.

Change-Id: I28ac441cacfceef1ad5622f15fecac1d2cca9395
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-05 08:20:41 +00:00
Robert Loehning
444e4f7ee6 Debugger: Initialize CdbEngine::m_autoBreakPointCorrection
Change-Id: I5baf137116e71d39c23dcc7bc12e87b363f30d98
Reviewed-by: hjk <hjk@qt.io>
2017-10-04 18:52:25 +00:00
hjk
af63f488c2 Debugger: Simplify CdbEngine construction
Moving the knowledge that this won't work well outside windows
kind of decreases encapsulation, but that's not really worth the
complication of the error handling here.

Change-Id: Idcb6f6d64f33ee8c49a01e62e20aad16d3f01b86
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-29 14:12:54 +00:00
hjk
895acd23e3 Debugger: Move external terminal into separate RunWorker
Change-Id: Ifb9701f840195ba90db48a0f6fa07b28e0409648
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-27 12:16:19 +00:00
hjk
526e217ce9 Debugger: Centralize abort handling
... and apply even more force on the second trying by forcing
ramp down of the runControl itself instead of hoping that it
would pick up hints.

Change-Id: I9d0f4130cb9a137b91c9fa81c3d255f236f98be0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 12:46:13 +00:00
Jarek Kobus
b506fce0fe Fix string messages
Found during translating.

Change-Id: I9626b3393d7b53300f7c806acbc5e12bc58574d2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-11 08:29:41 +00:00
Ulf Hermann
47886969cc Drop unused variables and lambda captures
Also, add context to connect() expressions where we are or were
capturing "this".

Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 09:06:53 +00:00
hjk
a512c8e0c8 Debugger: Centralize some parameter sanitization
Change-Id: I00e7c22adcf32ba8251b357e75eb9207b6f98f1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-06 09:57:27 +00:00
Joerg Bornemann
d954c944fe Fix application output of qtestlib projects when debugging with CDB
Tell QTestLib to use OutputDebugString for logging when "Run in
Terminal" is turned off. This way we are able to distinguish CDB's
output from the debuggee's output.

Task-number: QTCREATORBUG-16161
Change-Id: Ie5e6e4a0cbb853167766f782521101eff2e1963a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-29 07:27:50 +00:00
Orgad Shaneh
9a1030cfab CDB: Fix loading of user scripts
Change-Id: I20008227fd73b16978d63b50c4b9a38c0b590f09
Reviewed-by: hjk <hjk@qt.io>
2017-08-27 13:07:31 +00:00
Leena Miettinen
6fccc45a92 Debugger: Fix UI text to follow the guidelines
Change-Id: I7afa680c15f9dacfa8b0a17c16c442211d4fc7ce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-08-01 11:15:04 +00:00
hjk
406ddaa36c Debugger: Remove DebuggerRunParameters::device member
The device is always available via runTool().

Change-Id: I4a2a791a5a75b32803c06fc34947b82b869fe31c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 13:49:17 +00:00
hjk
36ec37b29d Debugger: Streamline ramping down
There were only two used target states, and in case of mixed
debugging all parts of the machinery better agree on the
direction. So one bool in the (shared) runTool is sufficient.

Change-Id: Iffbf1651b82dde707cfc37d8da9d3da573b34b76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-19 09:56:49 +00:00
David Schulz
f811cff769 Debugger: Execute extra dumper commands after cdb start
Change-Id: I3dfc803695ffaa04d719103d8bec59ce8b4f08e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-05-18 13:07:52 +00:00
hjk
1f6764a54e Debugger: Move run parameters from engine to tool runner
The parameters belong to the run control, they should not
be triplicated in case of a combined engine.

Change-Id: I4dd84220edbd7a44b902cc52627fe01d0568db75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 07:05:09 +00:00
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
David Schulz
a4bc6e8ee6 Debugger: Instruct user to enable CDB support component
If the cdbextension can't be found in 4.3 it's most probably caused by
an update of Qt Creator via Maintenance Tool. Instruct the user to
enable the 'Qt Creator CDB Debugger Support' component via the missing
cdbbextension message box.

Change-Id: I1e71d89ca75049dc1a2aacbe2b17bebf910a0d91
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-08 06:55:46 +00:00
David Schulz
c3191f5922 Debugger: Adjust missing cdbextension message
The cdbextension isn't part of the binary artifacts repository anymore.
Adjust the message so the user knows that he has to build the
cdbextension in the matching bitness by himself.

Change-Id: I5a06edda62be8178fc64fb98468291d395598d74
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-02 09:10:09 +00:00
Eike Ziller
dae2556d2f Merge remote-tracking branch 'origin/4.3'
Change-Id: I44511e06986b7df6007be7daf7051c895a10794b
2017-04-21 15:30:00 +02:00
David Schulz
7fa9316a96 Debugger: Disable break on warning/fatal for cdb
This seems to cause more trouble than benefit. Additionally this option
is on the _gdb_ extended settings site.

Task-number: QTCREATORBUG-17902
Change-Id: Ie548f68f84bffee670559b48f6a2ba259f8b8757
Reviewed-by: hjk <hjk@qt.io>
2017-04-20 08:00:21 +00:00
David Schulz
e19620ddd5 Debugger: Warn about unsupported shell commands when using cdb
Task-number: QTCREATORBUG-6927
Change-Id: I20e2311d5069da9315a7b5a5bc8d698fe5e6e52b
Reviewed-by: hjk <hjk@qt.io>
2017-04-19 09:05:16 +00:00
Montel Laurent
d29396b164 Use qEnvironmentVariableIsEmpty or qEnvironmentVariableIsSet directly
Change-Id: I4f2e61e4bade9e7b4518d144db8163e596ab6264
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-04-19 08:00:14 +00:00
David Schulz
17485c0678 Debugger: Optimize python output handling
Change-Id: Ia97e8adaabbffe49acec44575621a4f4243c5cea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 07:07:38 +00:00
David Schulz
c00bb1dcfb Debugger: Pass uninitialized variables to the python dumpers
Reduces accessing uninitialized memory

Change-Id: I025e9070b9b17a806237619b484cb27230e7f494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 07:03:23 +00:00
David Schulz
68ac850fe6 Debugger: Fix command setting active frame
Using this command without prefix and with the 0n decimal prefix
resulted in unreliable frame selection. Last chance is the hexadecimal
prefix.

Change-Id: I935d88849eb541534d4f311ac6059bcd35aee62c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-29 12:39:25 +00:00
David Schulz
c73bcd32a8 Debugger: Prepend additional info to cdb exception task entry
Most users expect build related entries in the Issues pane, so prepend
debugger related exception entries with a prefix making clear that these
entries are not build related.

Task-number: QTCREATORBUG-17806
Change-Id: I8a78c1eff3a4386f108997954329b694c223400f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-27 07:58:15 +00:00
hjk
329db5f4cc Debugger: Use ProcessHandle in notifyInferiorPid()
Change-Id: Idcb6819b64964b6aa0e72d182cc628feba37ba55
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-01 11:57:48 +00:00
hjk
4e1922ce5f Debugger: Remove some unneeded "No process" notification in CDB
Change-Id: I84d4aa30ff52f9a368503edc41f4a51e709a3a6e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-01 08:37:03 +00:00
hjk
32ae4d3e09 Debugger: Use Utils::ProcessHandle for DebuggerEngine::m_inferiorPid
That's the intended "typesafe" use.

Change-Id: Ib288fe87a47bd9484bda83e05406f0d22989b3c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-01 07:56:18 +00:00
David Schulz
763330030f Revert "Cdb: Use decimal prefix for frame number"
This reverts commit ab1b631d76.

I'm currently not sure when to use which prefix and the documentation
isn't clear about that either. Currently reverting this change until it
is known what prefix we have to use here.

Change-Id: I906dcffa1b35e462bb6ed9713405d00d342c8a39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-01 06:21:41 +00:00
David Schulz
577ab21b30 Debugger: Add a "use python dumper" setting
Change-Id: I8bed1a8641e5cf46f50f7c9fced9a1b6c01964ed
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-03 10:58:07 +00:00
David Schulz
ab1b631d76 Cdb: Use decimal prefix for frame number
Change-Id: Ie6e30a04009db4e75e001d2f0e17a2d2ab10d778
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-19 11:25:58 +00:00
David Schulz
aae9af60fe Debugger: Remove duplicated code
Change-Id: I40b4a2fb511ede41aa64d6e18af51d8f87d4e1f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-07 11:34:41 +00:00
hjk
d583469249 Debugger: Keep watchers alphabetically ordered
Task-number: QTCREATORBUG-12308
Change-Id: Ifdffa20f3ccec6aa2c086ce83db3b4a8817e08ab
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-30 07:24:04 +00:00
Friedemann Kleint
14eadb0f6d Fix accessing temporary copies via QStringRef
Amends change 840e787175

Change-Id: I633500b0fdbeeeb8b3d8accd3aec1e2990c62bca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-28 08:25:14 +00:00
Friedemann Kleint
840e787175 Use QString::splitRef() instead of QString::split()
Avoid string allocation where it seems feasible.

Change-Id: I61b23d4ef8a459f5aa77727a75f4e1d2b140da3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-25 11:32:47 +00:00
Ulf Hermann
d771ba8921 Debugger: Don't clear unrelated views when updating locals
If the list of partial expressions is empty we need to tell the watch
handler that we are only updating the locals view, not e.g. the
inspector view.

Change-Id: Iedc74ffc66a8435faa272d053849b831f6b8cbbe
Task-number: QTCREATORBUG-16692
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-11-04 09:35:10 +00:00
David Schulz
4e06822fc5 Cdb: Set frame when using the python engine
Change-Id: Ib84735b58f516dad14c992edba6a0c8e9005ecfc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-21 07:39:55 +00:00
David Schulz
3c10e586e7 Cdb: Setup symbol paths before attaching to a process
Change-Id: I075661ac95da3937dae8c918b83fcc4449d9b56e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-18 08:52:45 +00:00
Eike Ziller
21258bac46 Merge remote-tracking branch 'origin/master' into 4.2
Change-Id: Ibc8b4de34e6790854d23b829c96a1a128ea0e6a4
2016-10-10 09:25:10 +02:00
hjk
bcdc41b42b Debugger: Update L&E view when toggling dumper use through CDB
Change-Id: Ic227009a83197ca25d95acee494372bb53833a96
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-10 07:12:26 +00:00
David Schulz
a83d539551 Cdb: Introduce interface for python dumpers
Change-Id: I0ef2fd8a44232d65b0d772fd6c65230266d586a8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-07 06:40:20 +00:00
David Schulz
530be10612 Cdb: Improve command logging
For easier copy pasting comands from the log.

Change-Id: I60e2737540d403454cd36f42e7b1ac3cf203df07
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-30 04:59:18 +00:00