Commit Graph

580 Commits

Author SHA1 Message Date
David Schulz
204a2daac0 Debugger: show info when installed qt misses debug symbols
Pointing the user to the relevant package that has to be installed in
order to get the full dumper functionality.

Task-number: QTCREATORBUG-26456
Change-Id: I0e80f06e1cadcaa9ad2f8a734ca4dda026fc95db
Reviewed-by: hjk <hjk@qt.io>
2021-10-28 08:38:32 +00:00
David Schulz
bc55c7cc70 Debugger: use FilePath in stack frames
Change-Id: I98b6aa60e1b72be3482916446b87cee89e6cf2a4
Reviewed-by: hjk <hjk@qt.io>
2021-10-27 06:28:56 +00:00
David Schulz
5a2b58550e Debugger: use Qt version from kit as fallback for dumper
Fixes: QTCREATORBUG-26456
Change-Id: If2cd664212b3fa07d7abaef7a1173f79716884bb
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 12:06:18 +00:00
David Schulz
12bc192422 Docker: mount python dumpers to device
Change-Id: Ic0d67b4a18247439f5797a0dcf74df945ef6f61e
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 08:56:16 +00:00
hjk
b237db519b Debugger: Use FilePath for core files and surroundings
Change-Id: Icd648147ee907a2c5ba75042f003229bbd9226fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-29 07:35:06 +00:00
Christian Kandeler
284817fae6 Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.

Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-01 14:53:58 +00:00
hjk
53050255de Utils: Rename FilePath::normalizePathName to normalizedPathName
Change-Id: Idf5faab1cf55d6f7cca493c8ad451825310f5d66
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-23 11:15:01 +00:00
Christian Kandeler
c3d9293004 Fix some compiler warnings
Change-Id: Ibc354e7a8d0342eb12b2b0f9b2c630d15422f22a
Reviewed-by: hjk <hjk@qt.io>
2021-08-18 13:55:24 +00:00
hjk
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
hjk
52e5023bcc ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-13 15:04:30 +00:00
Jarek Kobus
d22505c41f Use refactored ProcessMode
This patch needs to be applied together with the parent change.

There are 3 basic cases:
1. The user doesn't write anything to the write channel:
   You don't need to call closeWriteChannel manually anymore.
   By default the QtcProcess you create is in ProcessMode::Reader mode.
   Internally it opens the process in ReadOnly mode and
   closes the write channel just after starting.
2. The user writes some initial data (after being started)
   and then closes the write channel:
   All what is needed now it to set the write data
   (QtcProcess::setWriteData) before calling start.
   You also use the default ProcessMode::Reader mode.
   Internally it opens the process in ReadWrite mode
   and writes the writeData asynchonously when the process
   already started. After writing the data it closes the
   write channel automatically.
3. The user writes the data also after calling start.
   All you need now is to create a process with
   ProcessMode::Writer mode. In this mode the write
   channel is not closed.
   Internally it opens the process in ReadWrite mode
   as some writers also read the data from the process.

All the code base is adapted here to the above rules.

Change-Id: Id103019d1d71a3012fd1eade226fe96b9aaa48c2
Reviewed-by: hjk <hjk@qt.io>
2021-08-09 07:51:31 +00:00
Kai Köhne
bf04c98c1c Do not pass QStringView by const reference
That's what the documentation says:

  https://doc.qt.io/qt-6/qstringview.html#details

Change-Id: I0b41fc4abad1601c0ed416a505534cf7ae7633e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-17 09:54:42 +00:00
hjk
08040e4e94 Utils: Move QProcess base to QtcProcessPrivate
Change-Id: I4c6811d42e051fadfcf32edb664ff3bc09e692e6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-02 13:21:08 +00:00
David Schulz
447a719fe2 Debugger: more QString > FilePath replacements
Change-Id: I7242546574d7692f97419a9df876330c800719ab
Reviewed-by: hjk <hjk@qt.io>
2021-05-28 04:47:56 +00:00
David Schulz
a13aef759e Utils: filepathify fileutils
Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 14:30:53 +00:00
hjk
03b2920d31 Debugger: Use QtcProcess instead of SynchronousProcess::stopProcess()
Change-Id: I6206e64e098d3490738a9c2a76ff433c990aab17
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-03 10:22:09 +00:00
hjk
8e352af0ec Core: Add a default parameter to various ICore::*path functions
Saves some code on the user side.

Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-04-27 06:52:05 +00:00
Eike Ziller
c1f90aeca2 ICore: Change some path API to use FilePath
Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-04-26 08:03:47 +00:00
hjk
641604429a Debugger: Use an aspect for the source path mapping
More in line with the other settings.

Change-Id: I86494f1955120cddda7d2f2eec8ba0fdbfd99585
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-09 12:40:12 +00:00
hjk
93a5803956 Debugger: Aspectify settings
Change-Id: I527be79965250b82a0928171b17aa93bac9fa2a0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-03 07:39:17 +00:00
Alessandro Portale
b3686d410d Debugger: Use qAsConst with non-const Qt containers in range-loops
Change-Id: I7bd27f8317b62fe448e037d5a25e78b4c88c648d
Reviewed-by: hjk <hjk@qt.io>
2021-02-17 08:03:09 +00:00
hjk
da147880e8 Debugger: Rename 'AttachExternal' to 'AttachToLocalProcess'
And AttachCrashedExternal to AttachToCrashedProcess
And AttachCore to AttachToCore.

Clearer.

Change-Id: I47c2eca5cbdbbc0eb38b9f62b2504c96558ff112
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 12:11:42 +00:00
hjk
b0d2c0d45d Debugger: Drop base DebuggerEngine::runEngine()
The lines between engine setup and running have always been
blurry, so it looks more and more unnatural to enforce this
in the architecture. Remove the runEngine() call from the
end of notifySetupEngineOk, and do it on the user side.

Change-Id: I3a5e158e8b3fe9b0a288d064f798e24b2ac47f86
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-05 06:21:27 +00:00
hjk
f2f139e90e Debugger: Remove DebuggerEngine::stateAcceptsBreakpointChanges()
Dead code since 3b5ecac238 (the end of the hybrid engine).

Change-Id: Ibb169ff657c8a88fdc52783a6a1f5b79fa0b29e5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-18 16:16:58 +00:00
hjk
fcaa6801cf Utils: Start replacing SavedActions by QAction or Utils::Aspect
First mechanical step here is to derive SavedActions from BaseAspect
instead of QAction.

Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-05 08:46:27 +00:00
Eike Ziller
2a70bc1d09 Debugger: Fix build with Qt6
QStringRef gone.
ViewOptions changed.
MetaType register stream operators automatically.

Task-number: QTCREATORBUG-24098
Change-Id: Ibf98561af951aa5fc4ec483d18dafeaad02e07c3
Reviewed-by: hjk <hjk@qt.io>
2020-09-18 14:41:20 +00:00
Eike Ziller
20f51bc642 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/languageclient/languageclientcompletionassist.cpp

Change-Id: If12e1c532e5623ef063681309a918e7b51117b1c
2020-09-14 10:12:14 +02:00
Dominik Holland
a535196c41 Add support for multiple Qt versions in "Load QML Stack"
Enable the functionality for cdb again.

Change-Id: I75405f830dd208cc110d6682a45beedf2f4199cc
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-09-11 08:11:21 +00:00
Eike Ziller
2a05186194 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	CMakeLists.txt

Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
2020-08-21 10:08:55 +02:00
David Schulz
2dddc8520b Debugger: use additional cdb arguments
amends 2942ae876c

Change-Id: Ie1c2eb75300382ff8f350c8a66b893c6bfa21996
Reviewed-by: hjk <hjk@qt.io>
2020-08-18 11:24:03 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
hjk
6c590531b0 Small Qt 6 migration stuff
- qsizetype vs int
- QJsonValue vs QJsonValueRef
- #include for metatype system

Task-number: QTCREATORBUG-24098
Change-Id: I066d9e3d5c35766b8aa3adc1c5835b23feb20b37
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-29 14:03:19 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
David Schulz
8541650096 Debugger: disable load qml stack action for cdb
Since collecting the qml stack relies on calling functions it has a high
risk of getting stuck in that call at least with Qt 5.15. Never the less
I added the correct function in the cdbextension so when the action
get's re-enabled in the future we already start with an updated
extension.

Task-number: QTCREATORBUG-22209
Change-Id: I535f8db5a64ae48b4163d9b67e133cc3de338432
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-14 12:44:15 +00:00
hjk
b9f47c5f02 Some Qt6 porting
- QVector cannot be forward-declared anymore as it is a typedef in Qt 6.
- 64 bit sizes cause warnings in printf("%d")

Task-number: QTCREATORBUG-24098
Change-Id: I75fc2a1113fb7a6e8c298e985eb7eb8d1a4c21b0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-09 09:59:54 +00:00
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
c30eab99e3 Debugger: Port cdbengine to QRegularExpression
Change-Id: Ib957e2696b5bc791ecc0e35676edaf8d0a2467a4
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-23 05:53:21 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
David Schulz
317d0a77a1 Revert "Debugger: use correct environment for the cdb process"
This reverts commit 4749550fbc.

Reason for revert: The debugger environment doesn't contain all path adjustments from the run settings in the project mode.

Fixes: QTCREATORBUG-24045
Change-Id: Ic714e7b99d51d51f74297f916817f302e8c4e1bb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-20 06:21:30 +00:00
David Schulz
4749550fbc Debugger: use correct environment for the cdb process
Change-Id: I7027be25df7380810b7c8fbd0e9bc5b9abd67dc3
Reviewed-by: hjk <hjk@qt.io>
2020-05-13 10:59:10 +00:00
Christian Kandeler
eb96f9900a Fix clang 10 warnings about unnecessary copies in range loops
Change-Id: I3b57869b5a04528518bc432b76768b01e3f53e81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 13:45:43 +00:00
Eike Ziller
e9661e43cb Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp

Change-Id: If6963d1ef7b5a1ea6343f68c8e7ce6fb5f482f21
2020-04-28 15:48:36 +02:00
David Schulz
f71286db98 Debugger: evaluate expression before assigning when using python dumper
Fixes: QTCREATORBUG-23711
Change-Id: Ic386b3e4bdd948e74f52116248de1b33a35fe03a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-24 10:58:07 +00:00
Eike Ziller
10114dc036 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidmanifesteditorwidget.cpp

Change-Id: I8143d9e02837dcd78a637da7b333a6eeebb105cb
2020-04-07 11:13:58 +02:00
Viacheslav Tertychnyi
e0e5334d83 Debugger: Fix tooltips
Fixes: QTCREATORBUG-19574
Fixes: QTCREATORBUG-23807
Change-Id: I61f997e69f4a747aff8c5e1044bb6d856494ae47
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-03 10:14:33 +00:00
David Schulz
9cfd1b5d6c Debugger: Split long cdbextension commands
Fixes: QTCREATORBUG-22922
Change-Id: I5def321f0f97717728bc5cdcd5309b458a8ecfa1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-03 08:25:51 +00:00
Eike Ziller
7f0b418a22 Merge remote-tracking branch 'origin/4.11' into 4.12
Change-Id: I125d2e574cbee28d69c8181909f2db57e897f0a4
2020-03-20 08:00:06 +01:00
David Schulz
b17de35ef4 Debugger: Add separator between cdb extension paths
According to
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/
general-environment-variables
extension paths have to be separated by a semicolon.
Skipping the separator results in not being able to
debug with cdb since the debugger cannot find the
Qt Creator cdbextension in the now invalid extension path.

Change-Id: Ic1c478dbb94f4e774e6742a3800dbcf6452898d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-20 05:25:46 +00:00
hjk
0334b6e491 ProjectManager: Add convenience Task subclasses
For Compile, BuildSystem and Deployment. Unclutters user code and reduces
binary size.

Change-Id: Ia18e917bb411754162e9f4ec6056d752a020bb50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-20 10:11:59 +00:00
hjk
5496d7cbde Debugger: Use new IOptionPage convenience for global options
Change-Id: I42391a01027f25be638b2d1b839d3038bced5f33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-09 12:45:48 +00:00