Creator 14.0.0 effectively assumed "less then Qt 6 is Qt 5", even if it
is (incompatible) Qt 4.
We are now falling back to the expensive version extraction for anything
less then Qt 6 but it gets the distinction between 4 and 5 right again.
The check (once per debugger session) happens now unconditionally again
for Qt 5 and earlier and is arguably a performance regression for
Qt 5 / Creator 14 users, but it's not worse then Creator 13 where we
didn't have the shortcut mechanism
For master we should consider extending the qtVersionPing() to also
provide a cheap distinction between Qt 4 and Qt 5.
Change-Id: I4073395280fdf137e89c834bf014b9f31d74a1cd
Fixes: QTCREATORBUG-31355
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Basically the same. Only the type lookup of the inner type needs to be
avoided for performance reasons.
Change-Id: I2747ab44c23b764482b4a063d3618fae2e3c4d46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
And remove the now unused DumperBase.Type.targetName helper function. We
can use the typeId nowadays for this. This reduces duplicated code and
simplifies adjustments in the base implementation without breaking the
cdbbridge.
Change-Id: If76297b83f088d98493c6f5aceea8fa93093e42e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If the inner type is null at this point it will also be null when
assigning the same type again.
Change-Id: I4dbad41a60d4853ac016adb54c693ce19d6f65d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The function is nowadays generating values the exact same way as the
base implementation.
Change-Id: Ie1b167021d9d450959d9cf3c27b0ac8ec7d0d3af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and add some typing infos to the cdbbridge
Change-Id: If85bc75976c869332ef658c32615f6b110459048
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
'res' is not part of the function anymore, the result of the split is
directly written into self.type_template_arguments_cache since
67072d3f5b
Change-Id: Ib76b1f82a4f807e54fbb3cec96b317c36011bf51
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... by not overwriting DumperBase.qtVersion. This function already
checks whether the Qt version was passed via the fetch variables
command.
amends 3aee50f5fd
Fixes: QTCREATORBUG-31049
Change-Id: Ifa67be5701fc7e5492e4c1fcb8943111b299c78d
Reviewed-by: hjk <hjk@qt.io>
It looks like there are Qt-using scenarios without easy way to have
the right Qt version in the kit,
Among the frequent cases where we need to distinguish Qt versions in
the dumpers are the Qt5/6 container layout differences which can in
some cases be detected from the currently dumped value. Use that now
as the primary distinction and fall back to the previous expensive
peeking only if that is needed. This also postpones any Qt version
related activity until a real Qt type is encountered, i.e. does not
impact non-Qt scenarios.
Task-number: QTCREATORBUG-31033
Change-Id: I67b6e34c42994ad9f6e8ec8698b430b55327cf0c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Extend the solution from
commit d86cf5e235
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Sep 24 12:02:06 2020 +0200
Debugger: Retrieve and remember int from native GDB value
to also retrieve the int representation for numeric values
from the corresponding native gdb.Value if a typedef to
an integer or bool type is used, not only when an integer
type is used directly.
This makes expressions for bifield members in the
debugger's expression view show the correct value
when the type of those bitfield members is a typedef
to an integer type.
Extend the "Bitfields" dumper test accordingly.
One real world example where incorrect values were
previously shown is GtkWidgetPrivate from the
GTK library [1].
[1] ebc84a6185/gtk/gtkwidgetprivate.h (L39-76)
Change-Id: Ib39e00ebbfc8d7d9ab10dc89af61f37ec41fb4ee
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The type cache has been split into smaller caches for individual
aspects. Type ids are now integral, not strings.
In addition, there is new supporting code for logging, timing and
profiling
Change-Id: I6db72a149650d42aecf8b899869c542b1303d43b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
From https://issuetracker.google.com/issues/240007217#comment17
"Some a background on the technical aspect of SEGVs:
Android Runtime (ART) uses SEGV for various internal purposes (it
triggers a SEGV and handles it without crashing the app, the app doesn't
know it happened). When the native debugger is connected, the debugger
must intercept all SEGV signals.
When running the debugger on Android API level 27 and newer, we make the
debugger skip these SEGV signals (i.e., forward them to be handled by
ART), because we know how to handle real SEGV signals inside ART. For
older Android versions (26 or older), we did not have this support, so
the debugger stops at every SEGV (i.e., it cannot know if the signal is
a real crash or an ART-internal thing)."
Arguably, this should be caught by the LLDB Android platform bits, but...
Task-number: QTCREATORBUG-30759
Task-number: QTCREATORBUG-29928
Task-number: QTCREATORBUG-30080
Change-Id: I8cabe4a0675c596a9617520aff0d62ad11321f0e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
A stripped-down and modified version of pyprof2calltree.
Change-Id: I9e37a4e13f312b40144394572ef6603bb2161487
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
They get in the way when working in that area.
Change-Id: Id59c83472a6ce093ca9b31ad9e94ec638b4a1df8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Setting the breakpoint actually worked, but it was reported back
using a wrong address, so it never went "red" in the disassembler view.
Change-Id: I4c2bd808705dfe793c0febf29b3e78b318dbae00
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
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>
Add debugging helper for std::tuple and add
a corresponding dumper test for it.
With this in place, the std::tuple variable and its elements
in the "tuple.cpp" sample program from QTCREATORBUG-25865 are
shown as expected on both, Linux (libstdc++) with GDB or LLDB and with
an MSVC build with CDB on Windows.
A debugging helper for libc++ had already been added in commit
34ff9c97e6.
Task-number: QTCREATORBUG-25865
Change-Id: I24b3d36b5daa26fd4fcb073c4df79015dfe752fc
Reviewed-by: hjk <hjk@qt.io>
Improves dumping of QObjects when the staticMetaObject is defined in a
different module than the object itself.
Change-Id: Ic02103016d14b4925978d8afeaf2dbcc5dcebf85
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add debugging helpers for std::string_view,
std::basic_string_view and std::u16string_view
and add a corresponding dumper test for them.
With this in place, values of the local variables in the
"string_view.cpp" sample program from QTCREATORBUG-25865 are
shown as expected on both, Linux with GDB or LLDB and with
an MSVC build with CDB on Windows.
Fixes: QTCREATORBUG-25865
Change-Id: If8959e3225d9ce7f427a65ff6f1f134d3ad48e91
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
cdb reports static members in fields sometimes with a null address.
Ignore those static entries since they cannot be visualized.
Change-Id: I0c58b2d75e95892185051e3c0a8dd9e6217596c3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When working with statically linked Qt qVersion may not be available.
In that case Qt uses the qtHookData which has type of quintptr.
This type is subject to SyntheticChildrenProvider because lldb
hooks are set up via a regular expression.
When SyntheticChildrenProvider is instantiated, it tries to fetch
Qt version, which causes another instantiation which again recurses.
The fix is to bypass SyntheticChildrenProvider via GetNonSyntheticValue.
Change-Id: Id00cdb3d0a0895bb02e4b3e4504c574d89be2ed0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>