Commit Graph

436 Commits

Author SHA1 Message Date
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
Orgad Shaneh
5bc8d10baa Remove uses of deprecated QProcess::error signal
This overload of error is deprecated in 5.6.

Replace with errorOccurred, which was introduced in 5.6.

Change-Id: Iccfba7e7103b7ce377471696f1f2ec217e52c840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-09 16:02:43 +00:00
Orgad Shaneh
1853f01a5b Merge remote-tracking branch 'origin/4.1'
Change-Id: Ia442f30f387fe9292217582260bbe79e54608810
2016-08-05 11:40:07 +02:00
hjk
588443b259 Debugger: Use a StandardRunnable for the debugger process
One step further to separate the debugger environment from the
inferior environment and to make it possible to configure a
working directory. Guessing one from the inferior's working
directory is not always a good idea.

Change-Id: I33d139c0f228ec0870556b82bc6aecca0a8e62d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-04 10:07:43 +00:00
David Schulz
4b74fc4322 Debugger: Fix empty memory when viewing inaccessible address
Always report back when content for the memory view is requested.

Task-number: QTCREATORBUG-16555
Change-Id: Idc6202a392899c5d524c696ac7342c4ea4487b1e
Reviewed-by: hjk <hjk@qt.io>
2016-08-03 12:25:31 +00:00
hjk
6e925910b4 Debugger/BinEditor: Standardize interface
Change-Id: I4acf6bc7648e57c564e86023176ae3905a293a99
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-21 06:20:52 +00:00
Tim Jenssen
e420d8b692 fix msvc2013 build
Change-Id: I9b21102285751d0bc6952c949d65ed57edb64bcf
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-22 07:48:04 +00:00
Eike Ziller
1681066c37 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/debugger/watchdata.cpp
	src/plugins/debugger/watchdata.h
	src/shared/qbs

Change-Id: I19b338b316d9c4c046074eb85b3fec79e86e6c32
2016-06-09 12:07:01 +02:00
hjk
726b907cc3 Debugger: Remove debuggerstringutils.h
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-09 08:09:46 +00:00
David Schulz
60f4a48666 Cdb: Disable noisy symbol loading.
It may cause hick ups when debugging an application that has pdb files
larger than 1 GB.

Change-Id: I596d8f39396f39164f4b59df8ac0b06fbf2ad358
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-08 07:46:46 +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
David Schulz
202711c770 Debugger: Use the cdb process environment to search for symbol paths.
Change-Id: Ia2cfa060c7c836db13bd1cabbde82c7630e4eb33
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-22 13:15:35 +00:00
David Schulz
1da7c060cb Debugger: Always set the cdb symbolpath.
In newer cdb versions the default symbol path points to the microsoft
symbol server. This can lead to a very long start up time for inferiors
including many modules, because every module is verified against that
symbol server. Unless the user does not explicitly set such a symbol
server in the cdb settings do not use a symbol server.

Change-Id: I0b24e2dd12f6cef98c55f4f57f0c800cecfc3c3f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-18 14:16:31 +00:00
David Schulz
c1ad70087d Debugger: Remove verbose option of the debugger log.
Saves an asking for debugger log roundtrip when the information is just
visible in the verbose log. Was just used inside the cdbengine.

Change-Id: I9801d3ccd8f273c3b4afcf053b00e7af0953a63f
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-18 07:45:36 +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
92e301a054 Debugger: Merge debug mode and analyze mode
On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.

Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.

Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.

Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.

Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.

Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-07 15:06:10 +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
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
hjk
d72cb777ec Debugger: Use hex instead of base64 encoding for CDB debuggee output
Simplifies code.

Change-Id: Iaabb4b32f7b351d04b512cc132f990a1061da3b5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-15 08:04:20 +00:00
hjk
55c77e4286 Debugger: Use hex instead of base64 encoding
... for transport of memory contents in CDB machinery.

Change-Id: Id29aa2a3008ec7e4fc9494ca9e26c4057f895663
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-14 11:51:48 +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
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
hjk
77661e378a Utils: Remove qPidToPid() adapter function
Since Qt 5.3, there's a QProcess::processId() providing direct access.

Change-Id: Ia9c143c7a92ec61d1aa36ff3f4670ba72a509634
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-16 12:08:16 +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
0095953e22 Debugger: Make CDB DebuggerCommand handling more similar to LLDB
Change-Id: Ib0ea7e95e2744f521cf369bd03d3d88ee2578cb2
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-11 08:01:27 +00:00
David Schulz
bbe8195d01 Cdb: Add register size and type to the gdmi structure.
Change-Id: I8c87a92e6a76165a99c3654b7b71bd539a51d67c
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-09-03 08:08:25 +00:00
David Schulz
eec4014239 Cdb: Just print debug output when requested.
Change-Id: Ib0ecc41179e1adc7d0ccc7b026fbb0a454bb4c7a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 11:58:10 +00:00
David Schulz
f6186e0c25 Cdb: Clear output buffer after assigning it to the response.
Change-Id: I35d5b47d4b56863bd5d24c2ee9c5c6bf115fb6d0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 11:18:12 +00:00
Nikita Baryshnikov
4ec9019104 Debugger: fix metatype declaration macro usage
in places where we do not need it.

Change-Id: Ifb7eba6f46bf79f2cfe968ab8b71cca3a7d51efd
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-08-28 11:04:27 +00:00
hjk
afa6bb9dd8 Debugger: Make (sub-)registers editable
Change-Id: Ibca2808513b6784b65d5c7223717a8b1d930c381
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-08-28 11:04:12 +00:00
David Schulz
03be835b2d Cdb: Replace CdbCommand with DebuggerCommand.
Change-Id: Ie4d4d17c01d54cfdb5957138076a45bb7a9f5455
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-28 10:54:49 +00:00