Commit Graph

662 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
3ec87e37ee Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/todo/optionsdialog.cpp
	src/plugins/todo/todoprojectsettingswidget.cpp

Change-Id: I24ca90c2fc2cd707df901d42694df6d0e27d696d
2022-07-20 12:03:40 +02:00
hjk
3007b990e5 Debugger: Load dumpers from the device that runs gdb
... not from the device of the inferior.

Amends 12bc192422.

Change-Id: Ief34d1765d48e87a9098522bafb4b419a857c42e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-14 12:41:10 +00:00
hjk
9894c6eaf0 Debugger: Convert to Tr::tr
Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-08 12:32:38 +00:00
Christian Stenger
ebf57d37b9 Debugger: Avoid crash when debugging with remote cdb engine
When trying to attach to an already running cdb session remotely we
currently fail.
When debugger is aborted on QC side and the remote cdb afterwards we
crashed when selecting a no more existing perspective.

Change-Id: I9d3c20f034b25ef85449b0b4e658aab2c3988db8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-28 08:37:07 +00:00
hjk
af4a6b1a74 Debugger: Use ProcessResultData a bit more
Instead of its individual items.

Change-Id: Icd668a61de1c2de676e0a44769f1c1bb5375c523
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-16 15:43:25 +00:00
hjk
d76458a8b6 Utils: Replace Environment::size() check by some isValid() function
More descriptive, and later implementable without full expansion.

Change-Id: Ic3b17ea0b07273f292827a7b63e7695b4bd1cf23
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-03 09:42:26 +00:00
hjk
d663986ef1 Debugger: Remove one use of Runnable::device
Change-Id: I46a004b9536e3b32f3fd620b86e39722c7ddcb6d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-25 12:15:17 +00:00
Jarek Kobus
6cd736fe6c Remove algorithm.h from buildtargetinfo.h
Change-Id: I777212fb94d46c1c71f017288b7e38dd5db62a91
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 08:38:05 +00:00
Artem Sokolovskii
27fddc8dc7 Debugger: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ib49afb4d0283aeeffead6b31e1a3d0bcb9a7ae14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-03 09:32:04 +00:00
Jarek Kobus
7fadaff5d4 IDevice: Make it possible to forward declare Ptr and ConstPtr
Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-14 12:27:04 +00:00
David Schulz
a8cad01887 Editor: make sure to update marker on annotation change
Ensures an update for the markers editor widget after any of the
information displayed in the annotation has changed

Change-Id: I845e05f5103ee1615cfc3d7760cdfc2bbf510f32
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-15 05:22:01 +00:00
hjk
f2dea561ba Debugger: Introduce a Ctrl-F9 shortcut to enable/disable breakpoints
Since "toggle" now becomes ambiguous, change "Toggle Breakpoint"
to "Set or Remove Breakpoint" and add a new "Enable or Disable
Breakpoint"

Fixes: QTCREATORBUG-26788
Change-Id: I7902308298570360af202fced90bf44fc1a59adb
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-04 06:14:16 +00:00
hjk
122edddb6a Debugger: Robustify view access
Task-number: QTCREATORBUG-26449
Change-Id: Ic13508e15bc9e33ce0641703f8827870adeaf2d4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-09 09:39:47 +00:00
hjk
45a716bd0c Debugger: Use FilePath in DebuggerEngine::gotoLocation()
Change-Id: Ic3a278de7f70af677547f00bc6de4d7bd15502bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-29 08:40:34 +00:00
David Schulz
399a5cb713 Debugger: make inappropriate debugger warning silenceable
Task-number: QTCREATORBUG-14539
Change-Id: Idb119736816c933509fac5748beb547696a991c0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 11:02:47 +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
12bc192422 Docker: mount python dumpers to device
Change-Id: Ic0d67b4a18247439f5797a0dcf74df945ef6f61e
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 08:56:16 +00:00
Orgad Shaneh
badc1f8551 Debugger: Use correct macroExpander when substituting regexp
Change-Id: I1d17063044b0e0e52b055a3e53b214f311cf6008
Reviewed-by: hjk <hjk@qt.io>
2021-10-16 16:43:36 +00:00
hjk
fcc981937f Debugger: Expand macros in "Additional Startup Commands"
Fixes: QTCREATORBUG-26382
Change-Id: I43cc2ac9451dbb44bcc12ed8555535fb8b4e437e
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-15 06:22:59 +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
hjk
736820a1a0 Debugger: Make ElfReader work remotely
This does not use the mmap optimization so it might turn out to be
too expensive for large files and slow connections. For now it seems
good enough for docker and normal test cases.

Change-Id: I0ba09bdbd6aac977209494a33099479f1f8eec0a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-09-09 09:47:09 +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
hjk
4a42bcd4e8 Utils/ProjectExplorer: Use FilePath for Runnable::workingDirectory
... and in some using code.

Change-Id: I231ea56628908f7d305d13f07eabe8803fe8a791
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-06 12:51:24 +00:00
hjk
1955c82d5c Debugger: Register "Reload Debugging Helper" action
This allows assigning shortcuts via Tools->Options, Environment,
Keyboard Shortcuts

Fixes: QTCREATORBUG-25900
Change-Id: I6dfa6b0f3ff12ad971444b2d3adb427c8acf783c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 11:48:03 +00:00
hjk
077c149667 Debugger: Don't pass comments as custom commands to backends
GDB creates disturbing replies for them.

Fixes: QTCREATORBUG-25666
Change-Id: If6223d1065cb96301e3e25aec15e653702e78d08
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 06:37:26 +00:00
Eike Ziller
34cd28aac0 Debugger: Fix compilation with Qt 6
Amends 7ccd9d6943

Change-Id: I8567a1238b9cc770c2a5ec551a06ef64a1164a0a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-04-13 12:33:22 +00:00
Eike Ziller
4151f091e3 Merge remote-tracking branch 'origin/4.15'
Change-Id: If0dbebdf37b0ffea2528bf6ce6d34d88554f8dfb
2021-03-16 10:55:54 +01:00
hjk
06a754cc74 Debugger: Add more information about the debugee when debugging
Fixes: QTCREATORBUG-25159
Change-Id: Ic462c8bb4d9f4f7163dbb9fcc13adce4c7172564
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-03-16 08:12:26 +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
7ccd9d6943 Debugger: Move interpretation on nature of source path mapping to user code
Change f0e2708 introduced the ability to specify source path mapping
containing regular expressions and used this in the elf reader.

To simplify the code, this change here moves the decision which paths
are considered regular expressions to the user. The other users which
are not aware of the special handling of paths starting with '(' in
the elf reader will interpret them as plain string, which appears to
be the right thing.

Change-Id: I31f10ed866fe7582d44307a923b6db10206acc9a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-05 10:52:57 +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
Orgad Shaneh
35245a7fcf Debugger: Show Threads dock by default
Change-Id: I11480919b4bccab2f5472d4683a3ee81068cac71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-02-25 10:38:43 +00:00
Eike Ziller
f79e4b3677 Merge remote-tracking branch 'origin/4.14'
Change-Id: Ib343adc6b761d15410d357137e4fc38040ce8d48
2021-01-20 11:13:11 +01:00
hjk
79ade10c4a Debugger: Add an option to show simple values as text annotations
Change-Id: I726d8559d7e28abd776ce483d5f670be5af09412
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-20 09:45:03 +00:00
David Schulz
80a1870292 Debugger: log the debugger exitcode also in hex
Change-Id: Ia9742bfa9c36c7ff4fdd965f2a32ea36a4239422
Reviewed-by: hjk <hjk@qt.io>
2021-01-19 05:38:04 +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
111cc934fd Debugger: Mark currently hit breakpoint in breakpoint view
Fixes: QTCREATORBUG-6999
Change-Id: I2b080de0096d1e2bc5b348666adcf4797589fe15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-07 12:09:40 +00:00
hjk
14c3f5ba51 Debugger: Drop the EngineSetupOk state
Directly proceed to EngineRunRequested.

Change-Id: I8419086f554bae298624cab3b33e852e92ea54bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-05 07:40:12 +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
Eike Ziller
8d67dd57e8 Merge remote-tracking branch 'origin/4.14'
Change-Id: I5e138bb7883c0436fee14ca6af20e99396676af1
2020-11-20 13:00:37 +01:00
hjk
ff3614ab5a Debugger: Don't use QApplication::alert too often
There's an ICore::raiseWindow() call already for spontaneous stops,
conditioned on boolSetting(RaiseOnInterrupt). This should be sufficient
for normal operation.

Task-number: QTCREATORBUG-12769
Change-Id: I33daad2579f9cfdb8fd121b9c9db73c05f9eccb7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-20 09:47:36 +00:00
hjk
2bfd515b03 Utils: Allow BaseTreeView users to hide columns manually
... using a context menu on the header views.

Use the feature in the debugger views where it was previously
un-intuitively available as part of the main context menu of
the view, but not in the header.

Task-number: QTCREATORBUG-24384
Change-Id: I3f030c3dd8ce35dc91bad921e37d2273bfe548b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-10 14:28:39 +00:00
David Schulz
af88afe943 Debugger: Activate split that contains the breakpoint being hit
Do not change the current editor after hitting a breakpoint if we
already have an editor open in another split, but switch the focus to
that split.

Task-number: QTCREATORBUG-24646
Change-Id: Id85cecdfb522807bafa097e578509853326a2e31
Reviewed-by: hjk <hjk@qt.io>
2020-09-16 07:29:30 +00:00
hjk
82e25e71c8 Debugger: Remove left-over comment
Change-Id: I5fecaed75cb2b5368e904ea4202657e56361f0d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-15 15:02:02 +00:00
Alessandro Portale
0be309bcf1 Various places: performance-for-range-copy
Change-Id: I475990d32a5211d31a77782667a2dfedba134137
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 05:58:46 +00:00
hjk
afde217f28 Debugger: Convert a QRegExp use in source path map
Task-number: QTCREATORBUG-24098
Change-Id: I1ee441a60cbf362d38459bcef869e02d7fca9b7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-10 07:07:23 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Eike Ziller
be73f41ad4 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ib95ec2c50c4bbaefd4ed0ec5af191ccc846c824f
2020-05-04 10:52:34 +02:00
David Schulz
09b69b274d Debugger: Fix crash after adjusting font size
Change-Id: Ic3b415a3791968f972d2f69ec71c8012c572995d
Fixes: QTCREATORBUG-14385
Reviewed-by: hjk <hjk@qt.io>
2020-05-04 04:22:56 +00:00