Commit Graph

1315 Commits

Author SHA1 Message Date
Eike Ziller
88897f3a87 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp
	src/plugins/genericprojectmanager/genericproject.h
	src/plugins/genericprojectmanager/genericprojectnodes.cpp
	src/plugins/genericprojectmanager/genericprojectnodes.h

Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
2017-04-19 09:56:14 +02:00
hjk
5d97c4871a ProjectExplorer: Remove startRunControl()'s runMode parameter
It is redundant, as a RunControl has a runMode() getter.

Change-Id: Ia048b271a5003356d21f86a3f778827d23466037
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-04-12 12:11:49 +00:00
hjk
ee27248a56 Debugger: Streamline DebuggerRun{Control,Tool}Setup
Only one code path needed once we have a RunConfiguration.

Change-Id: Ib65f471a929a0c70694dd142b4f83be7eebbe151
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-12 11:56:44 +00:00
Orgad Shaneh
b66baab4b7 Debugger: Run user commands as native commands
Change-Id: I2b13880eace49818c20815a21c3e327f87ec04bc
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 05:49:10 +00:00
Orgad Shaneh
1bc2610b0b GDB: Fix break on main for console applications on Windows
It relies on the user setting (which has a correct default, but can be
changed), but that's better than nothing.

Change-Id: Ib74b348a8932b3522074f122cf939fcb20ccefb8
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 14:36:44 +00:00
Robert Loehning
8e1910b7cd Debugger: Comment out dead code
Change-Id: I91218d9b7b3fa6433d7e64d68b4974a1fdcd295c
Reviewed-by: hjk <hjk@qt.io>
2017-03-07 17:31:33 +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
99a6d78bba Debugger: Use (only) -thread-group-started as pid notification
The notification exists since GDB 7.4, i.e. no further restriction beyond
our current 7.4.1 minimum requirement, so there's no need to read pids
from tea leaves.

Change-Id: Ibfe14a46059fc1c917ada6ac445b364c958d0b3f
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-02-28 10:19:11 +00:00
hjk
9c211ab424 Debugger: Record breakpoint hit count
Looks like the field was spelt 'times', not 'hitcount'.

Change-Id: I7226747ba7d41e9600cb66e95e7c59c6a226151b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-21 11:44:05 +00:00
hjk
e051c9c28b Debugger: Trim user startup command input before usage
No need to push empty lines etc.

Change-Id: I16862e9cc1fe19ced1000a954c71a4044ed9d0ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-15 09:27:31 +00:00
hjk
541dd8643d Debugger: Inline GdbEngine::write into caller
Not used in earnest since the end of CODA/Symbian.

Change-Id: Ib2d22fb247d178b091a17f9927aa911d6707d3f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-07 06:58:03 +00:00
hjk
fd2bf97f82 Debugger: Remove the "Attempt quick start option"
This was GDB-only. It complicates the startup mechanism including breaking
certain setups (e.g. users manually controlling "set auto-solib-add" in
their .gdbinit) without providing too much benefit (anymore).

Part of the potential debugger startup time improvements that were
possibly gained by the feature are nowadays available by using a
release build *without* debug info, as one of the original reasons
to not use that (making Qt type introspection hard/impossible)
is largely gone with 4.2+.

Change-Id: Iffb34e0035f39ad74b24bf025749b546f25a489b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-06 13:15:19 +00:00
hjk
b8c0801e0a Debugger: Run extra post-attach commands as "native" gdb commands
Change-Id: I5c3fac1e03b400f837a090b136ff8aa0ce8e21de
Task-number: QTCREATORBUG-17659
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-01 08:10:54 +00:00
hjk
a17919fbd0 Debugger: Allow explicitly marking of non-Python commands again
This conceptually reverts part of a61b6dfc.

Task-number: QTCREATORBUG-17594
Change-Id: I9ff72a027838a20039f217ed0d669b6c45bc2acf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-24 10:46:47 +00:00
hjk
66b19f334d Debugger: Provide a startup customization hook for 3rd party plugins
Change-Id: Ia587abcb1bdcdfbf192d3314610ec9addf370c9b
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-23 14:48:28 +00:00
Tobias Hunger
c6f90e575e Utils: Introduce a TemporaryDirectory and TemporaryFile class
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".

Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:17:10 +00:00
Eike Ziller
589fedf455 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/projectexplorer/kitinformation.cpp

Change-Id: I94299b069418586db97d1d596a252794e4037556
2016-12-20 17:14:19 +01:00
hjk
fb57391767 Debugger: Make gdbbridge fetchVariable output similar to lldbbridge's
Change-Id: I11fc7d163dbd6b7deb5e88cac65dc61df3352411
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-19 10:37:16 +00:00
hjk
fc01d0ac46 Debugger: Use new shared result reporting infrastructure
Unify the watchPoint() interfaces, move the combined
implementation to the DebuggerEngine base.

Change-Id: Ic93aa760e7258197aed5eb7bfea257a40012cccf
Reviewed-by: hjk <hjk@qt.io>
2016-12-16 07:41:43 +00:00
hjk
5c2a7b57e4 Debugger: Mimic parts of lldbbridge in gdbbridge
Make code more similar for later sharing.

Change-Id: I260e10ba1b613dfcebc45bb1a268b6fcebbde353
Reviewed-by: hjk <hjk@qt.io>
2016-12-16 07:41:34 +00:00
hjk
a61b6dfc57 Debugger: Move command flags to debugger command
Also, remove the need to mark GDB Python commands, detect the
need to use MI on the presence of non-Pythonic letters in
the command (space and hyphen).

Plan is to reuse even more almost shared code between engines.

Change-Id: I4e00debb07f2482637930675a28f464666b59553
Reviewed-by: hjk <hjk@qt.io>
2016-12-16 07:41:17 +00:00
hjk
c2eada278e Debugger: Fix Window grabbing on GDB
Needs to make namespace detection work without valid frame

Task-number: QTCREATORBUG-17326
Change-Id: Ia7c7017db4ef384d4f246e11a5601d01f4f366f1
Reviewed-by: hjk <hjk@qt.io>
2016-12-15 17:22:18 +00:00
hjk
26331f771a Debugger: Avoid messagesboxes on the same topic at the same time
Task-number: QTCREATORBUG-16971
Change-Id: I625f04cbd8f609c66597450dbad22ebc6eadcfe5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-14 14:10:14 +00:00
hjk
af3834f1ee Debugger: Force direct engine shutdown on GDB crash
Task-number: QTCREATORBUG-17341
Change-Id: I4011345fbd8810841f4236cc532a0eafcaf587b8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-29 11:41:41 +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
hjk
61b408d110 Debugger: Force flushing of GDB output
... after continue and step. Otherwise there would be no reaction
after the inferior gets an external SIGKILL while stopped.

Task-number: QTCREATORBUG-17280
Change-Id: I57933e92194a3320d7aba81055755477f34af382
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-18 07:07:39 +00:00
hjk
e265c5403b Debugger: Merge two variants to set detach-on-fork
Change-Id: I8459110b2729c0ee8c797f184c018fdb44cafe45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-15 08:26:18 +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
Christian Stenger
5711a74d0a Debugger: Remove now unused functions
Change-Id: I85c27bd11a5bbe35a911f6aa2d6f628d7f0ffa28
Reviewed-by: hjk <hjk@qt.io>
2016-10-12 07:33:32 +00:00
hjk
cb7fb51313 Debugger: Fix QML extra stack loading for GDB
Change-Id: I702bb8f183e93fe25857115225fa55607ffb1674
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-12 07:04:56 +00:00
hjk
b8f96f5629 Debugger: Make {G,Ll}dbEngine::doUpdateLocals more similar
Change-Id: I8877dbc3b6c9166d8d8781453b753f22ebc0a579
Reviewed-by: hjk <hjk@qt.io>
2016-09-20 13:37:19 +00:00
Jake Petroules
f41b48ef5d Rename Abi::MacOS/GenericMacFlavor to DarwinOS/GenericDarwinFlavor
This makes clear that the ABI encompasses all Darwin platforms (macOS,
iOS, tvOS, watchOS) in the wake of the OS X to macOS rename, and would
have been more technically correct anyways since ABIs are far below the
"macOS" parts of our favorite desktop Unix operating system.

Change-Id: I16d1477f44ffe70e5d8cddd67199a1602ba6fd97
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-22 12:54:06 +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
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
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
hjk
6897dfa164 Debugger: Remove 'nopass' on SIGSEGV GDB handler
This has been used since the dawn of time but seems to cause problems
with JVM code.

Task-number: QTCREATORBUG-16565
Change-Id: Iae8a2949671d162f84b9dfe954c8dfbbd743a8de
Reviewed-by: Sandro Mani <manisandro@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-13 06:05:10 +00:00
hjk
7e8d9835f7 Debugger: Do not pass inferior output unncessarily through MI parser
Change-Id: I809c6bf9cd1b97a728af341819b3f009335ffa36
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-14 05:43:43 +00:00
Erik Verbruggen
ae7e03d51f Fix compilation.
There is no + operator that takes a QByteArray and a QString (or vice
versa).

Change-Id: I8734923cbbb0360bc20f9775d57801803782716f
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-09 09:47:15 +00: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
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