Commit Graph

517 Commits

Author SHA1 Message Date
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
David Schulz
2763704bee Cdb: Store pending commands in an Hash.
Use the command token as the key. Simplifies the CdbCommand,
because the command token doesn't need to be stored in the class.

Change-Id: Ic43ba16529db6e11ce00db1db49b384a627a4941
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-28 10:54:45 +00:00
David Schulz
d582b73a64 Cdb: Unify builtin and extension command queue.
Change-Id: I2dd85201cbab9095987be61146a16d516bfd114f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-28 10:54:41 +00:00
David Schulz
845ee6a61d Cdb: Replace CdbResponse with DebuggerResponse.
Change-Id: I2fddd5904de665bc7e6731ee4be69639d82258a0
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-28 10:54:38 +00:00
David Schulz
be8290eefb Cdb: Simplify storing split cdb replies.
Change-Id: Ia50b9255c0da70b8c473349ab2a6b6f3d88e01ed
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-28 10:54:34 +00:00
David Schulz
0aa4339353 Cdb: Remove the command from the response.
It was just used for diagnostic messages. The commands
can still be identified via the token in the messages.

Change-Id: If1c6f9e66bd65d9d3a16cb403d297c83b0c52d0e
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-27 08:12:27 +00:00
David Schulz
9e800bc0af Cdb: Pass the breakpoint id to the command handler.
This way the id doesn't have to be parsed from the command.

Change-Id: I8beb15c6d98a6628f373cf44b724dd4267efb728
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-27 08:12:22 +00:00
David Schulz
6633bc9927 Cdb: Remove command sequences.
Simplify the CdbResponse to become more like the DebuggerResponse.

Change-Id: Ifdd7c69e340b4c18c0e1187eb2173979feccd5b9
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-27 08:12:15 +00:00
David Schulz
66df65b2dd Cdb: Unify the cdb builtin and extension command reply.
Change-Id: Icaee4aee4fbb22b2a55f64cc43effdaebbe63a55
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-25 11:27:35 +00:00
David Schulz
d26fe608de Cdb: Unify posting commands to the cdb process.
Change-Id: I8e3bd400efa6fd12fd098a53d9e991aea658a743
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-25 11:27:31 +00:00
David Schulz
90b0d561b6 Cdb: Remove unused CdbCommand member.
Change-Id: I716cd00b47b8ae52d497817f0849f608222bfd33
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-25 11:27:26 +00:00
David Schulz
c02d9c9253 Cdb: Print output of user commands to the debugger log.
Change-Id: I48a1beb6c47758dafa3629c8c8b770417b823a4e
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-25 11:27:19 +00:00
David Schulz
56a46bbcda Cdb: Print out user debugger commands to the log.
This also removes the need for a command flag.

Change-Id: I6ad8a2c5d49673783cf06a2612c33e0cd5555706
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-25 11:27:15 +00:00
hjk
d48ac14fba Debugger: Simplify removal of outdated L&E items
This removes the need of bookkeeping on the engine side. It's
basically a kind of mark-and-sweep: On update begin mark items
that are expected to change as outdated, while data arrives, undo
that marking, and update end remove all remaining marked items.

Change-Id: I739b84869033d511d5c9a80605c079e87ef4f6a7
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-07-07 08:08:08 +00:00
David Schulz
b1d6ab754a Cdb: Inform the engine about an inferior exit.
Task-number: QTCREATORBUG-14652
Change-Id: I67e450bad1873e0fd68f6ae11ea29f227dd5682f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-07 07:17:26 +00:00
David Schulz
abf2a634a0 Cdb: Remove the symbol path dialog popup.
When setting up a symbol server path, the debugger startup could
increase to an unacceptable amount of time. So this is an attempt to
hide this feature for the standard user, but still keep it accessible
for everyone else.

Change-Id: I719f3091fe483f446488c75001e29278e1b405ea
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-06 12:32:04 +00:00
David Schulz
33c2365392 CDB: Don't show status messages for set thread name exceptions.
Change-Id: Id80086990a456ba9bf6d5b86097f95f2197d0971
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-02 11:24:45 +00:00
David Schulz
2659e505e6 CDB: Add status messages for loaded modules.
Change-Id: I7fc676f938f69ecc8d228a0d3509da6e7e3e0b1a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-02 10:55:13 +00:00
hjk
6af260205a Debugger: Mark two strings in the CdbEngine translatable
... after some re-wording.

Change-Id: Ibc8f0c58b56689c3f1af863db3c796db07bf3670
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-26 09:09:51 +00:00
hjk
60a8442d8c Debugger: Rework start parameter completion.
It's again a linear process now, with explicit entrance point for
all users.

Task-number: QTCREATORBUG-14618
Change-Id: I96c08947270ce34d7bc6c8be1d7f350dbfa14794
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-25 12:13:35 +00:00