Commit Graph

442 Commits

Author SHA1 Message Date
hjk
87ca7882c1 Debugger: Fix QPair dumping
Task-number: QTCREATORBUG-30538
Change-Id: Iee17aec458d9ab69cd4349bedb26b1a2270ca41c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-19 16:00:23 +00:00
David Schulz
a57a925b76 Debugger: defer type look up
Change-Id: I425c2bfc3c88ebf46af161c5434c0c05a3bb9c97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-27 11:32:53 +00:00
David Schulz
88aacbb562 Debugger: fix char type dumper optimization
Change-Id: I600f4ddc9a4539e19b70664fd9354c17e64cd0d6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-21 07:56:43 +00:00
David Schulz
c76fc8e1e5 Debugger: fix dumping char arrays
The calculation for the size of the memory to fetch for the dumper was
missing the char size information.

Amends a26aff7afd

Change-Id: I8ceb127efaf7effa94fc53e6782f75580ab8cdb4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-21 06:00:24 +00:00
hjk
a26aff7afd Debugger: Report full sizes instead of the elide setup
More direct communication of the meaning. Use 'length' when talking
about things like string lengths, and 'size' for sizes in bytes.

Task-number:  QTCREATORBUG-30065
Change-Id: Ifed84a5dab4ed890973c1abf4d427655eb50a61a
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-13 17:01:23 +00:00
David Schulz
596cd204e1 Dumper: fix array 10000 format
Fixes: QTCREATORBUG-29196
Change-Id: I23ddb17ac3f378b6602057c1964ef5984b83e245
Reviewed-by: hjk <hjk@qt.io>
2023-06-30 07:47:27 +00:00
hjk
de546ff3ec Debugger: Support piping dumpers into gdb
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.

Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 06:26:11 +00:00
Artem Mukhin
5c0a956e8c Debugger: Fix GDB MI output parsing
When using `lldbbridge.py`, Python throws `TypeError: string indices must be integers` because `gdbmiparser.parse_response` cannot parse the multiline output.

The bug was introduced in bb11788.

Change-Id: I5faae4c3d034c0f159e9c1e473b6929ba79b8272
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-12 11:16:05 +00:00
Eike Ziller
36d9341397 Merge remote-tracking branch 'origin/10.0'
Change-Id: Idf151b6cfe87957cf905e67aab6b1275b9f0506a
2023-03-06 08:24:18 +01:00
David Schulz
1124a75948 Debugger: Fix highlighting values and members in memory view
Fixes: QTCREATORBUG-23681
Change-Id: I1420385d0c923be0ae4dd7ef2662263b88623333
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-03 07:04:18 +00:00
Eike Ziller
87ede95b5c Merge remote-tracking branch 'origin/10.0'
Change-Id: I7bd186df0bfae7906e980e9c2c811f8dcf29750d
2023-03-02 10:17:58 +01:00
David Schulz
a4fb9e20cb Debugger: improve dump time for various msvc std containers
... by caching the info whether we have a debug build. This avoids
expanding members of the container to check for a potential offset of
the actual data.

Change-Id: I4d7ac83003c303185ae51d57f0f0571b627edf22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-27 12:26:37 +00:00
David Schulz
5169469911 Debugger: add <load more> functionality to array dumper
Change-Id: Ib44748fa3218788ca20a99b0a0f4cd85716dde06
Reviewed-by: hjk <hjk@qt.io>
2023-02-27 08:35:32 +00:00
David Schulz
1a575cd2df Debugger: Fix printing of pointer to multiple inheritence base class
...for cdb when we have no nativeValue. This is the case whenever we
have a container like std::vector, QList or a c array to the base class.

Fixes: QTCREATORBUG-28337
Change-Id: I18c63dfbc207d76bf41d85d5da83f7f4603504f9
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:49 +00:00
Łukasz Wojniłowicz
76260f8038 Debugger: Port away from deprecated getargspec
https://docs.python.org/3/whatsnew/3.11.html suggests using
getfullargspec instead.

Fixes: QTCREATORBUG-28505
Change-Id: I27199f7e2c3a070c675dce3a152d201e22a16380
Reviewed-by: hjk <hjk@qt.io>
2023-01-11 15:38:46 +00:00
Eike Ziller
0dfa542bee Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/cppeditor/cppcodestylesettingspage.h

Change-Id: I1aa4e2f9efc6d9cf9f284aef1abf148be9b93a60
2023-01-10 15:44:55 +01:00
Kai Köhne
4e9c1d126c Replace GPL-3.0 with GPL-3.0-only
GPL-3.0 is deprecated by SPDX.

Change done by

 find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \;

Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 08:05:04 +00:00
hjk
c7bb5fcc37 Debugger: Remove spurious waring
Task-number: QTCREATORBUG-27160
Change-Id: Ie69c60688249efcd4d2c2330d6555cf7f708edd2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 08:32:09 +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
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
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
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
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
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
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
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
David Schulz
4f9ed8d620 Dumper: Fix qobject name dumping for Qt 5 again
Amends: e05fe66f4b

Change-Id: I244017a63216a6bbc89d9f211eec7d7def27beb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-14 09:28:45 +00:00
David Schulz
35b190834c Debugger: fix stringdata offset in metadata
Change-Id: I94899346c8193218133f80aa2716a6e5d44093e2
Reviewed-by: hjk <hjk@qt.io>
2021-03-24 09:55:52 +00:00
David Schulz
e05fe66f4b Debugger: Fix qobject name dumping for Qt 6
Change-Id: I146aa3d0b9d0f66a56a5fb1595f64297e15ebab8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-03-24 08:29:30 +00:00
David Schulz
30ec121654 Debugger: Fix QObject dynamic property dumper
Change-Id: I120161f65a180f6facec0a5def2414ff128b31f9
Reviewed-by: hjk <hjk@qt.io>
2021-03-23 06:20:57 +00:00
Michael Weghorn
f4dc3fd5c5 Debugger: Prepend '*'s for autodereferenced pointers
If automatic dereferencing of pointers is enabled, the
"Value" and "Type" columns for pointers hold the values for
the dereferenced pointers.

In order to have a consistent behavior for the "Name" column
as well, prepend '*'s to indicate that the variable/expression
has actually been dereferenced.
Add parantheses around the original expression if it doesn't
match a simple regex for variable names, to avoid that the
leading '*' changes the meaning of the expression
(so e.g. a dereferenced 'somepointer + 1' is displayed
as  '*(somepointer + 1)' rather than '*somepointer + 1').

This introduces a new 'autoderefcount' field to propagate the
information how many levels of dereferencing have taken
place from the Python to the C++ side, which is then
used to add the leading '*'s for the display name.

Fixes: QTCREATORBUG-20907
Change-Id: Ia9a41cb42e25ba72a6d980a765dbe2b454deb8c8
Reviewed-by: hjk <hjk@qt.io>
2021-02-22 09:36:45 +00:00
hjk
977b999248 Debugger: Initialize DumperBase.output
This was used uninitialized in some put call from lldbridge's
disassembler.

Change-Id: I5a3ecf075dfd4a6c4e8a483f9f8172e295329ad0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-02 14:07:01 +00:00
Mattias Johansson
2081038953 Add gdb tracepoint support for Linux
Change-Id: Id2e46bae576a730f8c1b64a247aeed12e6d721af
Reviewed-by: hjk <hjk@qt.io>
2021-02-02 07:36:07 +00:00
hjk
c2e3e0419d Debugger: Prepare delayed type creation for DumperBase.Values
Change-Id: I283bcdec178e0a860bef71753cd29cc283a58391
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-21 11:21:01 +00:00
Eike Ziller
45c2634166 Merge remote-tracking branch 'origin/4.14'
Change-Id: I62523c4733e617c46131048f5f62a2ca9be47d80
2021-01-06 08:42:15 +01:00
hjk
052b0b4c92 Debugger: Re-organize std::vector and std::deque dumpers
There are indications that the std::__1:: namespace cannot be relied
upon anymore.

Task-number: QTCREATORBUG-25061
Change-Id: I54d8d2fc757b1cfc9b27f00660f2814d745f2bc6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-04 10:06:55 +00:00
Eike Ziller
4bc2b4741d Merge remote-tracking branch 'origin/4.14'
Change-Id: I842a7c7358fd0ff6d85c151806e440043914e09a
2020-12-14 14:19:15 +01:00
David Schulz
1981d90f39 Dumper: fix QMetaObject detection for Qt6 on windows
introduced by 9b8493314dd77f3e96b353187816bb7ef4dedbb5 from qtbase

This change does not address all usages of super data in the dumper, but
enables dumping children.

Task-number: QTCREATORBUG-24098
Change-Id: I813dacfa719dd6ca367e305fadcc8f2b8ee45425
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-11 14:01:20 +00:00