Commit Graph

1358 Commits

Author SHA1 Message Date
Eike Ziller
b038ea3a40 Fix debugging with LLDB
Broke with bb11788a0a

Change-Id: Ie02a36b98be83bd4721eacc834321a5494c584a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-09 11:47:52 +00:00
hjk
bb11788a0a Debugger: Avoid quadratic behavior for larger debug output
Task-number: QTCREATORBUG-28111
Change-Id: I0567b6af9f74c2d335d19a52765834ef7cee9449
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-08 13:53:30 +00:00
hjk
689ba1ead1 Debugger: Fix internal FilePath dumper
Amends 23e96dd6fe.

Change-Id: Ia602f09e4138125d41cb455b847e8b85ad767782
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-13 13:24:49 +00:00
hjk
23e96dd6fe Utils: Use a single QString as data store for FilePath
Plus a few integers to get access to the pieces.

This reduces sizeof(FilePath) from 72 to 32.

Change-Id: I65eb856ad47b6a250c705d8d01893781a21d8e02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-10-04 07:27:16 +00:00
hjk
37db98db30 Debugger: Simplify TypeData setup and registration
Change-Id: Ib23249eae63901d614cbe33fe184f174a10efbe4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-28 11:59:50 +00:00
hjk
2006d41680 Debugger: Store tdata as member in Type
Change-Id: I2e784be9a16914a30b08bdfbedb789d8a1d3f910
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-08 10:20:33 +00:00
Orgad Shaneh
661994c288 Debugger: Fix cross-endianness display for arrays
Debugging a BE target on LE host showed wrong values when expanding an
array.

Change-Id: Icad9db8be11c3093de3b7bab52df815bf56f1677
Reviewed-by: hjk <hjk@qt.io>
2022-09-05 13:55:14 +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
Marcus Tillmanns
b2b6577d5c Lldb: Use qtHookData to retrieve Qt version
Adds caching of Qt version information.

In case that qVersion() can not be found, use qtHookData[2] to retrieve
the Qt Library version number.

In case that also fails, we now use self.fallbackQtVersion instead
of just returning 0x50200.

Previously debugging apps in the iOS Simulator would fail to correctly
detect the Qt Version, as qVersion might be optimized out, especially
for very simple applications.

Change-Id: I9183c1e9793bd899f296a231c693cd5bc146ab96
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-25 06:24:15 +00:00
Marcus Tillmanns
8b143be86c Debugger: Adds boost 1.79 dumpers
Change-Id: I2111b91fe8914afdde54edd6009691dfe32e64a4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-24 06:56:08 +00:00
Marcus Tillmanns
42e1714ea1 debugger: Fix dumper for std::string and unordered_multiset
Moves mac specific dumpers to separate file
Creates android dumpers for stdtypes

Change-Id: I33d28198e1a2f24fb7707313845db81e283686cd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-08-23 10:49:43 +00:00
hjk
266adf7b1d Debugger: Delay template argument retrieval from native types
For performance reasons. They are often not needed.

Change-Id: I8a7bb03583b3ec2479a3691486c9c02f70ad014e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-22 13:26:02 +00:00
Marcus Tillmanns
2635d62721 Dumper: Show error message if module fails to load
Change-Id: Id4e445f71f70f0b07ccc4c4ffb25502607263dec
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 14:02:30 +00:00
Christian Stenger
5b67f03416 Dumper: Fix bitfield handling on macOS
Amends f14634a651.

Change-Id: Iae1c7ad9c78786c9178a07a493abb76db3b4c4aa
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 06:33:47 +00:00
hjk
c1d75d8df7 Debugger: Add simple dumper for QKeySequence
Change-Id: I097336fb77ff34e94c9096b51a511b3a0f2c86d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 08:18:53 +00:00
hjk
f14634a651 Debugger: Fix bitfield dumping with Python 3
Change-Id: I2959a2e14c6f25e29460de74ea95a16a5226d48e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 08:18:39 +00:00
Marcus Tillmanns
06be8a4325 lldb: Fix type inspection for QMetaType template types
lldb's FindFirstType() expects template types to have specific
whitespaces set. QMetaType's "name" parameter does not contain
the necessary whitespaces.

This solves that by changing e.g.: "T<A,B<C,D>>"" to "T<A, B<C, D> >".

Change-Id: I7505db96b01d433408af1942cd81e50094833c06
Reviewed-by: hjk <hjk@qt.io>
2022-07-07 12:21:38 +00:00
Christian Stenger
e7d90c23b6 Dumper: Fix dump of std::string on macOS
Try to handle the alternate layout of strings correctly.
Depending on the defines and the endianness the string structure
may vary quite a bit. Old approach just took care of the default
layout and the endianness.
In case of an alternate layout of strings we failed so far.

Fixes: QTCREATORBUG-26175
Done-with: Viktor Govako
Change-Id: I788eb5619408bca281eb887c3f6a269808c27d24
Reviewed-by: hjk <hjk@qt.io>
2022-06-27 11:00:43 +00:00
hjk
8bb22fa4f3 Debugger: Fail gracefully on systems without working base64 module
Change-Id: I341b0fdb1c9e32fda3ce80f3e7569cffbb0708d2
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
2022-06-23 08:26:02 +00:00
hjk
7f7768cdd1 Debugger: Add simple dumper for QSettingsKey
Change-Id: Ieaa702051066e7dcf7f0bd44d869e5a231c19112
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-15 06:29:55 +00:00
hjk
296edb321a Debugger: Add dumper for QAnyStringView
Change-Id: Ic7cd577559ae7e73a74daa93784b6f2e1c8abccd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-19 09:15:58 +00:00
Eike Ziller
6a296ab68a Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectplugin.cpp

Change-Id: I14030f58303839e706af892dd12a67566e3bed68
2022-05-18 13:35:47 +02:00
Christian Stenger
9be10225cc Dumper: Fix Environment dumper
Change-Id: I48349ca550981d19cf0087bccd38e4d2677d1897
Reviewed-by: hjk <hjk@qt.io>
2022-05-13 08:53:55 +00:00
Eike Ziller
9bf0efcbb9 Merge commit 'origin/7.0'
Change-Id: I90148816d32c81b9fef982b5010c785161d83097
2022-05-10 11:45:37 +02:00
Christian Stenger
d10f3f8342 Dumper: Fix map dumper for lldb
Change-Id: I8adab131632b2ca04a3de8094699ab43d2de03bb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-10 06:19:25 +00:00
Eike Ziller
70b9f13792 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp
	src/plugins/cppeditor/cppcodemodelsettingspage.cpp

Change-Id: I602f4ff13f9370ec20704efaea34b42445a75fd4
2022-05-09 09:48:28 +02:00
Christian Stenger
1346ffc159 Dumper: Fix offsets for QFile members
Change-Id: I890b3f387505cf5acc8783e3dc7088515d6934cc
Reviewed-by: hjk <hjk@qt.io>
2022-05-05 07:42:09 +00:00
hjk
61c6f532b2 Debugger: Use Qt 6,2 as fallback version
Change-Id: I0787d212f2a98b3aa2c2f1eda28b93731c81de08
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-04 06:12:38 +00:00
hjk
f529ec492c Debugger: Add dumper for qdump__boost__container__devector
From https://lists.qt-project.org/pipermail/qt-creator/2021-August/008922.html

Change-Id: I85fff706e7f90a8182a434316fed4b6a43958af6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-31 07:48:06 +00:00
Jean-Michaël Celerier
e0f539a068 Debugging helpers: support for boost::small_vector
Change-Id: Ided74fa2ebf3e4ae5258e22064bb105bd45710ac
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ihor Dutchak <ihor.youw@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-19 11:34:33 +00:00
hjk
0f3e4531c5 Debugger: Add separate display to QStringView dumper
And don't show the plain members anymore, unless explicitly asked.

Change-Id: I9854276c380d417fb9a98ae9c0dbae9356d42086
Done-with: Thiago Macieira
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-13 14:05:56 +00:00
hjk
ea13ade822 Debugger: Add QStringView dumper
Fixes: QTCREATORBUG-20918
Change-Id: Ib16ac37000d227e6af2bc6d6640136ba0a7333b1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 13:07:56 +00:00
hjk
d76fab2685 Debugger: Add dumper for quint{16,32,64}_{be,le}
Change-Id: Ieaa27a98b829455b69de0f8051fee8cbc3fa78f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-21 08:52:30 +00:00
Alessandro Portale
16ced8a7d6 Debugger: Describe right SBError for failed remote-android connection
It is the result of the previously attempted SBPlatform.ConnectRemote()
which we want to see in the logs if the connection fails.

Change-Id: Iec2760257eb8bb8c6b1df8aa3a5c010302966c8f
Reviewed-by: hjk <hjk@qt.io>
2021-12-16 07:23:36 +00:00
Anton Alimoff
d06183d9cc Add debug helper for std::variant
Change-Id: Ifb2f47203fb5c101be5b2180693e39ba07b90c2e
Reviewed-by: hjk <hjk@qt.io>
2021-11-18 09:03:31 +00:00
hjk
a8afa5c65c Debugger: Fix setting of Qt version fallback, again
Change-Id: I6b6cd448884800cb6d08dbdce15cb99f4ea8ba2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-10 11:50:21 +00:00
Christian Stenger
4303e62c50 Dumper: Fix passing fallback Qt version
We nowadays have an additional token there.

Change-Id: I65e5a55792802ae2ab7da6f7c6d8d1b109bf55a0
Reviewed-by: hjk <hjk@qt.io>
2021-11-10 10:20:08 +00:00
Andre Hartmann
f9f26570c9 Debugger: Add even more std and Qt char and int types
Make more stdint, quint and char types known to the debugger.

Task-number: QTCREATORBUG-26501
Change-Id: I1e757af2a495142fa37fe2b7cefec56690adbf08
Reviewed-by: hjk <hjk@qt.io>
2021-11-09 13:30:37 +00:00
Andre Hartmann
78a1beb06e Debugger: Improve handling of stdint types
* Make (u)intX_t known as integral type
* Handle uint8_t[] the same way as char[] and unsigned char[]

Task-number: QTCREATORBUG-26501
Change-Id: I1eac21be198f8107f088e56daf435b5bb3217120
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 13:12:02 +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
Christian Stenger
dde5a52693 Revert "Debugger: Drop support for backends relying on Python 2"
This reverts commit 43bcf91121.

GDB coming with MinGW shipped by Qt (e.g. 5.15  official) are still Python2 based.

Change-Id: Iad658de7a242345cc7f6081f26f0238071668a06
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-24 07:04:34 +00:00
hjk
43bcf91121 Debugger: Drop support for backends relying on Python 2
The last discussion of the topic was 18 months ago, and already back
then it seemed not widely used anymore. See
https://lists.qt-project.org/pipermail/qt-creator/2020-February/008382.html

Change-Id: I48c879ce918b7351b1120bd70892deb0330637f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-09 12:35:22 +00:00
Ihor Dutchak
716efc964d Debugger: Add support boost::container vector/static_vector
Also fix boost::container::list.

Change-Id: Iaa2ff09defc6f90c3f6eb1f7b333f9e5ccc16b65
Reviewed-by: hjk <hjk@qt.io>
2021-09-09 07:18:34 +00:00
Orgad Shaneh
7a7dc86716 GDB: Fix missing token on some responses
COOKIE FOR TOKEN 0 ALREADY EATEN (InferiorStopOk). TWO RESPONSES FOR ONE
COMMAND?

Change-Id: I569a9715f073f3fbba71045f14fa30a06cd434e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-06 12:48:11 +00:00
Alex Richardson
ebc229a25b Debugger: fix QString printing in LLDB with python3
Before this change I was seeing all strings as
`<failed to decode '...' as 'utf16'>` when using LLDB bundled with CLion.
This error is misleading since the actual exception raised from the python
code was `'str' object has no attribute 'decode'`. To fix this, I updated
the hexdecode() method on Dumper to accept an optional encoding argument
and use that instead of the python2 str.decode().

Change-Id: Ic3afc786c42fd7384d9dc3117f0871837076c2ba
Reviewed-by: hjk <hjk@qt.io>
2021-08-16 09:34:28 +00:00
hjk
adf70fd8f2 Debugger: Don't add empty path components to solib-search-path
Change-Id: I417e5193749dae44d189fc0189a92899d738976b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-06 07:18:43 +00:00
hjk
185ceda8f1 Debugger: Make user defined gdb-style dumper work with arrays
Change-Id: I1667061eacf78a6fa4df567ea033e7bb5269da2c
Done-by: Bruno Vasselle
Fixes: QTCREATORBUG-26027
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 07:25:59 +00:00
hjk
1fef4085bf Debugger: Support CLion based LLDB
Change-Id: Ie044def8c243a62734cc77a9eab29cbb1fa81e66
Done-by: Igor Lifanov
Task-number: QTCREATORBUG-14539
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-25 06:13:03 +00:00
hjk
55f3d566a0 Debugger: Use more sensible import defaults for personaltypes.py
Fixes: QTCREATORBUG-25898
Change-Id: I6fbaaf0c219299ff157446376959e305693a9902
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 09:52:17 +00:00
hjk
84b8930c27 Debugger: Display elision for long Utils::FilePath instances
Change-Id: Ifb89ad1af1a41dff87d9debbb72423288c59d632
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-09 12:00:05 +00:00