Commit Graph

23 Commits

Author SHA1 Message Date
Eike Ziller
04e50438eb Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.

Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-09-01 06:58:04 +00:00
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
Jarek Kobus
91f4ee7644 PeripheralRegisterHandler: Drop unneeded if condition
Amends 53e8f8c761

Change-Id: Ic27941cd2cb6725a7cd97f1ea5ea73bd4bc44ad0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-22 12:17:22 +00:00
Jarek Kobus
53e8f8c761 PeripheralRegisterHandler: Avoid using sender()
Change-Id: I3d8c6a22f03afcb589a9c35ff610c60ffbb881c9
Reviewed-by: hjk <hjk@qt.io>
2022-07-20 13:53:21 +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
hjk
b17bbcff38 Debugger: Use USVC extra data more directly
Not nicer, but more similar to the rest of extra data, so one
approach less.

Change-Id: I2c9a3a041ab3f017f3350c0399d57feeb422048c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-31 10:16:57 +00:00
Jarek Kobus
2853660a59 Utils: More forward declarations / drop unused headers [D-G]
Round 1 - focus on headers.
For classes with initial in range [D-G].
Try to keep the same separators between different kind of headers.

Change-Id: Id42cd7b3743a816f75cecb6b576c0e37cb057473
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:13:52 +00:00
Aaron Barany
03a0ed0786 Debugger: Use queued connection for menu actions
Pass the parent calling object to the addAction() functions and use a
queued connection. This prevents the following sequence of events:

1. The menu is dismissed when selecting a menu item.
2. The deletion gets queued via deleteLater().
2. The onTriggered action gets invoked and opens a dialog box.
3. The dialog box triggers the events to be processed.
4. The menu is deleted when processing the events, while still in the
   event function to handle the dismissal.

This only affected the watch menu since the others were leaked. Added
cleanup handlers for the other debugger menus to avoid leaking them.

Task-number: QTCREATORBUG-26989
Change-Id: Ifa2c52d7bea884c55d43fa545e3e2870301e4052
Reviewed-by: hjk <hjk@qt.io>
2022-02-07 20:20:58 +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
dad2b3d84b Merge remote-tracking branch 'origin/4.14'
Change-Id: I7d55c01489dfcdd26fcf3ced9f26539a09073e8c
2021-02-08 12:56:36 +02:00
Denis Shienkov
e106fd0090 Debugger: Handle missing {lsb|msb} tags in SVD file
The SVD file format describes the possible presence of tags
`<lsb></lsb>` and `<msb></msb>` to describe the bit fields
of the register data:

 * https://www.keil.com/pack/doc/CMSIS/SVD/html/schema_1_2_gr.html

So, we need also implement parsing for such tags from the SVD files.

Task-number: QTCREATORBUG-24414
Change-Id: I968cdfb4c86bfed0aac212c3f3a4376c8ee93ffe
Reviewed-by: hjk <hjk@qt.io>
2021-02-02 15:03:54 +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
Eike Ziller
3ee70780b4 Qt6: Sprinkle QLatin1Strings for QStringView comparisons
Task-number: QTCREATORBUG-24098
Change-Id: I2fb79bcfd0537a6704a1ee8db840401d6beca7a0
Reviewed-by: hjk <hjk@qt.io>
2020-10-08 10:38:47 +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
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
Denis Shienkov
fdf383cf37 BareMetal: Choose peripheral description file on debug provider page
... instead of device page.

Reason is that a path to the peripheral description file comes from the
inside of the provider for some providers (e.g. for the UVSC provider at
parsing the selected "Software Device Pack" file).

This complicates a code for assigning of the selected peripheral
description file path to the device configuration page.

So, it is makes sense to make it possible to choose a peripheral
description file from the debug server provider page. In this case we
will pass a path to the selected peripheral description file via the
runnable's extra data variable.

Tested with STM32 NUCLEO-F767ZI board on Windows.

Change-Id: Iec4d738dd236449969fd669e7fbe58da3a660938
Reviewed-by: hjk <hjk@qt.io>
2020-03-06 18:20:15 +00:00
Eike Ziller
5c121d5791 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp

Change-Id: Ib54f1645ec70a9e6460a888a13190ede130bccca
2020-02-05 11:59:35 +01:00
Denis Shienkov
6b10a1ad56 Debugger: Inherit register field access rights from register
... if this field has not the access rights information.

Fixes: QTCREATORBUG-23542
Change-Id: I3440fa0fd34dc91164eefcafc1ba74e852e103b9
Reviewed-by: hjk <hjk@qt.io>
2020-02-04 15:45:15 +00:00
Denis Shienkov
d5fd6a83d8 Debugger: Improve parsing of SVD file
The previous implementation was done in a hurry and a bit
overcomplicated for maintenance.

Now it is simplified and a common code moved to a separate functions.

Change-Id: I86e9131e08154ec24bb7778c3a7d4c3d6b042751
Reviewed-by: hjk <hjk@qt.io>
2020-01-30 14:31:52 +00:00
hjk
4bd26c3e4b Debugger: Add ability to hide view columns
Not perfect, e.g. one would probably expect the items to
appear in the context menu of the header views, too, not
just on the main background of the view, but better than
nothing.

Task-number: QTCREATORBUG-23342
Change-Id: Ifdc44dcfd390112faa7b15bb8a51d809e42d7b29
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-13 08:07:31 +00:00
Denis Shienkov
b7f34ef7f9 Debugger: Make peripheral register group menu scrollable
... to save a display space.

Change-Id: I93812bb97538dc88cc6e871a40e1bce6419024c1
Reviewed-by: hjk <hjk@qt.io>
2019-08-05 09:26:25 +00:00
Denis Shienkov
d855263869 Debugger: Fix start/stop bits order in peripheral register field tooltip
Usually this order should be displayed as [to..from] instead of [from..to].

Change-Id: I4a309eedc104b10ac89a48beacb0e187af5c1899
Reviewed-by: hjk <hjk@qt.io>
2019-08-01 08:26:20 +00:00
Denis Shienkov
239c82bfb0 Debugger: Add peripheral registers description file support
This feature is useful for the bare-metal programming. It allows
to view the peripheral registers of the debugged device using
the GDB.

An information about the peripheral registers for a concrete
device contains in a special SVD file. A format of this file
described e.g. here:

* https://www.keil.com/pack/doc/CMSIS/SVD/html/svd_Format_pg.html

This feature supported only for ARM devices, and an appropriate
SVD files can be found in the Internet, also this files provides
by KEIL or IAR EW IDE's.

A use case in QtC is that the user should to choose desired SVD
file and set its path to the bare-metal device configuration widget.
After this, the user can enable the "Peripheral Registers" view,
choose a desired register group and to see a peripheral register
values.

Currently the following basic features are implemented:

* Choosing SVD file for a target bare-metal device.
* Choosing any peripheral register group, which is available for
  this device.
* Seeing the info about the each peripheral register and its fields.
* Seeing the value for the each peripheral register and its fields.
* Changing the value for the each peripheral register and its fields
  (if it is allowed by access for a concrete register or field).
* Changing the format of the values (hexadecimal, decimal, octal,
  binary).

Fixes: QTCREATORBUG-18729
Change-Id: I3c38ea50ccd2e128746458f9b918095b4c2d644a
Reviewed-by: hjk <hjk@qt.io>
2019-07-31 19:46:29 +00:00