Commit Graph

226 Commits

Author SHA1 Message Date
hjk
f7242cdce9 Debugger: Some compilation with Qt 6
Change-Id: Ifffe68a3c902bbad026919171ac906ae05ec86f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-24 05:43:51 +00:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
hjk
79b680e7f0 Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit.

Keep the old versions as inline function now to ease downstream migration.

Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-09 17:30:23 +00:00
Eike Ziller
095311c072 Fix visibility of init and reset commands in debugger start dialogs
The labels must be hidden in addition to the input fields.

Amends b858e58d3f

Change-Id: I77cfafd11cd8dc739ab8dea669d8f8c84a9a4774
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2020-02-26 06:59:58 +00:00
Kai Koehne
fda9955df0 Globally disable WindowContextHelpButtonHint
Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.

AA_DisableWindowContextHelpButton was added in Qt 5.10.

Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 13:26:44 +00:00
Denis Shienkov
b858e58d3f Debugger: Allow to specify 'init' and 'reset' GDB commands
... in case the attaching to the remote running GDB server.

We need in this option for the bare-metal programming, because the
'Attach to Running Debug Server' option should cover functionality
of the removed 'Default' GDB server provider.

Without of this option the debugging is non-functional in a most
cases.

Change-Id: I77a37552b2c7c2e76d70dbecfe9e21f316c02534
Reviewed-by: hjk <hjk@qt.io>
2020-02-21 16:07:40 +00:00
hjk
82e8ceab8b Debugger: Use some more verbose description for attaching to remote
Change-Id: I36e9793b1db98b538455c8d6075e8116a5af14bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-02-11 13:12:16 +00:00
hjk
1396c6e8e9 ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-21 10:32:31 +00:00
Eike Ziller
23e30a03c5 Merge remote-tracking branch 'origin/4.10'
Change-Id: I3c62cf597e33e9978116944a64cdfb600eb3e24d
2019-06-12 09:24:11 +02:00
hjk
fe7e2530fd Debugger: Allow all debuggers when attaching to running servers
... but mark those that are considered non-matching. They actually
might in some cases (e.g. MinGW on Linux currently), and not allowing
them at all does more harm.

Change-Id: I1736373782db7f54c0f7a496f8e6a8deb02e6b45
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-12 07:12:49 +00:00
hjk
fee7e9fbda Debugger: Abandon special DebuggerKitChooser
The regular one with icon display is good enough nowadays.

Change-Id: I9a511c9975ceaeae0bb8005ac647fa710bf9d900
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-12 07:00:13 +00:00
hjk
77d2cebc12 Debugger: Use Utils::FilePath for serverStartScript
Change-Id: Ia3c6263a8f020b90c6f623a6cf88169db8fc2865
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-04 10:12:41 +00:00
Alessandro Portale
0933c20de8 connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 14:07:03 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Eike Ziller
60c22e8549 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/gradientmodel.cpp

Change-Id: I170de608eaae795133105dedb76ae6f93f6e0d92
2019-03-25 11:55:48 +01:00
hjk
70199aa4f4 Debugger: Hide hint label in dialogs that cannot use override ports
Change-Id: I4de5b8bca1084f89987c3656e7b46a62a0905051
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-25 07:04:19 +00:00
hjk
ceb0fe429d ProjectExplorer: Add RunControl::set{Kit,Target}
For cases where no genuine RunConfiguration is available.

Use it in the debugger for the cases triggered from the menu.

Change-Id: I5671f4f5db2547c4a7a70bd34292bb6ccc8e6bf4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:47:47 +00:00
hjk
efb7d8deb7 ProjectExplorer: Split RunControl constructor
Into a trivial bit and two setters. Plan is to use it only with information
that is truly there (e.g. kit/device only) at the user side without having
to invent a RunConfiguration "handle".

Also remove some dead code in the test runner.

Change-Id: I987881e41722178b14b91f973b84cbdb67a9f85e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:38:45 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
Orgad Shaneh
147a3c27c4 Debugger: Strip QLatin1* where possible
Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:32:31 +00:00
hjk
422da635f7 Debugger: Honor Run in Terminal for Start and Debug External Appl
Again.

Change-Id: I307e39045e97aaf418a915b1e9a968e7e4ab1ab5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-24 14:54:51 +00:00
Eike Ziller
ac9f1f798c Merge remote-tracking branch 'origin/4.7'
Change-Id: Ifb51ca9893549c478e99c9fc3ea6c32d5d5a28a2
2018-09-07 14:39:42 +02:00
Eike Ziller
c30b629b52 Fix environment for Start and Debug External Application
In this case we do not have a run configuration with the needed
information, so use the system environment, modified by the kit's
environment changes.

Task-number: QTCREATORBUG-20185
Change-Id: Ie95e6eecf0b81f09f2f2aca3d5e792e5b39d000c
Reviewed-by: hjk <hjk@qt.io>
2018-09-04 13:18:14 +00:00
Alessandro Portale
0558db7b54 Debugger: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-25 12:52:43 +00:00
hjk
0fbb2839f9 Remove ApplicationLauncher::Mode
The actual remaining use was to pop up a terminal in some
setups where Mode == Console, with a default of Gui meaning
"no console". In some downstream uses it was used set to
Console (probably to mean "this helper process does not need
a gui") but then luckily ignored when actually starting the
helper processes.

All cases where the console is useful and requested are
nowadays RunWorkers belonging to RunConfigurations with
a TerminalAspect, so they can directly get the relevant bit
from their RunConfiguration without having it part of
all StandardRunnables.

Change-Id: I1368d5968da5cf672656aebf200ccac8d45335d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 15:08:29 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +00:00
hjk
21c66ce5fd Combine some SshConnectionParameter members
Combine host, port, username and password into a 'url' member and
add some convenience accessors.

Change-Id: Iddc26ff00dad1285c96aa56f196dbc4febe8e974
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-12-19 14:19:31 +00:00
hjk
f1888a6331 Debugger: Remove no longer needed DebuggerEngine::setNeedsFixup()
Change-Id: I30bc1d6184bd66a634d890999e31dff48d2f25b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-13 12:36:20 +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
295d3d7170 Debugger: Avoid use of dummy RunConfigurations
Allow to rely on kit plus data directly specified in the dialogs.

This means, RunControls with nullptr RunConfigurations are allowed
again.

Change-Id: I0b574b397603c0520c8187a8967bff2cf5e20ae8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-26 06:29:31 +00:00
hjk
62ada96091 Debugger: Remove serverStartScript run parameter
Instead, create the resulting RunWorker as dependency directly.

Change-Id: Id15005bb5707bb97dfc61cc2f84409e759e60f9f
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 13:34:06 +00:00
hjk
ace413a74c Debugger: Don't second guess on run in terminal setting
Task-number: QTCREATORBUG-18912
Change-Id: Ie6ded1b7df032730e8e118e5679f288b21066667
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-15 12:13:12 +00:00
hjk
7eec0f63ac Debugger: Merge DebuggerStartParameter into *RunParameters
The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.

Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 14:00:59 +00:00
hjk
67b4a7a872 Debugger: Replace a few more uses of setRunParameters
Change-Id: I8f35bcd3812402cda7d3c69eb01ed3d3fb9e396a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 06:26:36 +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
Tobias Hunger
4ef01c961e app_version.h: Make IDE name configurable
Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-05 10:19:48 +00:00
hjk
3b22cd3e20 Debugger: Describe the "Override server address/channel" field better
Change-Id: I2bd112d1d2f46904513fa668a17f0a07ebe26e12
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2017-07-18 06:57:03 +00:00
hjk
3a45d763ca Debugger: Remove DebuggerStartParameters::connParams
It's nowadays a duplicate of a subset of what DSP::remoteChannel
provides.

Change-Id: I95363bd392cb1d24fb1f1e0a2780c2c295929cea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-23 13:09:04 +00:00
Tobias Hunger
25fbcca96b KitManager: Get rid of KitMatcher class
Use std::function instead. Clean up API while at it.

Change-Id: I6e401ab57f5375e36710c30508c596af3f4b3385
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-18 10:39:16 +00:00
Christian Stenger
1eafa1540e Debugger: Lower kit restrictions for debugging
In some cases it can be useful to be able to debug although not
having a complete functional kit present. (e.g. debugging a
core file having an ABI for which you have a debugger but having
no respective compiler)

Change-Id: Ia2567c8e2dd6783e612802cc08f7767399aaf33f
Reviewed-by: hjk <hjk@qt.io>
2016-11-18 07:12:51 +00:00
hjk
80b2a4f1ba Debugger: Expose DebuggerKitInformation::ConfigurationErrors
... to allow more fine-grained decision making for kit choosers.

Change-Id: I9a4e97f7b4f4b074e1c764f6b134c15e2896dc79
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-16 08:37:35 +00:00
Tobias Hunger
32b484e26e Introduce ToolChainKitInformation::targetAbi(Kit *)
Use that in the debugger. That simplifies the logic a bit.

Change-Id: Ia72607283373ee0f89a91f347db0ef2c87cf9fb3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:46:47 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +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
hjk
4c09ead418 Debugger: Require only a valid debugger in Kit selection
Lately, Kit::isValid() defaults to also checking e.g. cmake
configuration which is pretty irrelevant for this use case here.

Change-Id: Idfe3bf4b8836a9b8974473c95048cd853276f9c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-06 06:56:14 +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
Orgad Shaneh
cad9372ad9 Debugger: Do not append port if host not found
When choosing a kit with a bare metal device in Attach to Running Server
and *not* overriding the address, the address is not determined.

Change-Id: I431d0edee0635cda773e94737752aa9c31a1cac2
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-03 08:18:40 +00:00
Orgad Shaneh
6655f87fca Debugger: Change default languages to NoLanguages
... which is set to CppLanguage in DebuggerRunControlCreator::enrich
unless set to anything else previously.

Remove related hacks.

Change-Id: I5fcc39326e280192eb1ddb652636e9342baef94b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-13 07:58:33 +00:00
Orgad Shaneh
266036fe6e Debugger: Disable QML on Attach to Running Debug Server
Change-Id: I55da176c8885ff5de6d34f37c9eb278ca35a8ecf
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-13 05:57:56 +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