It causes an exception when being divided
Noticed with boost::icl::interval_set.
Change-Id: I5629436c3c1ba10e7b67bb05d720329f4c61eafe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This requires making template argument extraction a bit more robust
GCC 5.4.1 created debug info only reports the first argument for
boost::variant<int, bool>:
#include <boost/variant/variant.hpp
int main() { boost::variant<int, float> v = 1; return 0; }
py print(gdb.parse_and_eval('v').type)
-> boost::variant<int, float>
py print(gdb.parse_and_eval('v').type.template_argument(0))
-> int
py print(gdb.parse_and_eval('v').type.template_argument(1))
-> Traceback (most recent call last):
File \"<string>\", line 1, in <module>
RuntimeError: No argument 1 in template.
Error while executing Python code.
Change-Id: Iedca8b073078c93449ab61bb2cab05d6cd9803ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
These could be triggered by declared but undefined and unused
static data members.
Task-number: QTCREATORBUG-18030
Change-Id: I941e8cbe8ce18dca737e59472ed0ee19ace44072
Reviewed-by: David Schulz <david.schulz@qt.io>
Gcc does not write out full type names with 'using template ...', see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80466
This is in most cases harmless for Creator as dumpers are triggered
independently of template arguments. However, if the dumper takes
different code path based on the template argument type, as is
e.g. needed for std::vector<bool>, wrong results are produced,
as the type cache only used the template base name as type id.
Work around by mangling the id of the un-typedef-ed type into
the type id of a typedef, which, in case of templates contain
the full parameter list.
Change-Id: I63c59cccdc186b09ff780e9dfd57b0ad668ae98f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We get proper notification when QtCore is loaded now, and we either
got it, or not.
Change-Id: I9485126d9b15b8d859ba440f3ba1623f03527ef8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes it clear that this is meant to be immutable and is supposedly
faster.
Task-number: QTCREATORBUG-17823
Change-Id: Ie5d67b793e0bc4f704981d5161efc12bcc22100a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It worked with plain GDB (parse_and_eval), and was broken by
696b2d4261.
Change-Id: Ibc143efdbd90681a2f9f4d84b75063eb98078f2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Bail out on error results as early as possible.
The accessor always exists in libQt5Core, but it can't be found
when using a wrongly mangled name. Use the right one, and add
another sanity check before actually using the function.
Change-Id: I57975be188ca6b03836c0968e59d9603b0eecf27
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Needs to make namespace detection work without valid frame
Task-number: QTCREATORBUG-17326
Change-Id: Ia7c7017db4ef384d4f246e11a5601d01f4f366f1
Reviewed-by: hjk <hjk@qt.io>
... and use the option to govern general QObject guts display.
This allows people to completely avoid the performance impact
of attempted QObject display and still makes the feature
more prominent for our favorite use case.
Change-Id: I1e53b6448f646ab7eea9168a3cd24c77769e6328
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
There have been cases observed where 'p QArrayData::shared_null' finds
valid symbols that are not found using gdb.lookup_symbols. The cause
for that is unknown.
Apply an expensive workaround by checking for (the equivalent of)
a working 'p QArrayData::shared_null' but execute it only when
a libQt5Core was found. This keeps the overhead for non-Qt setups
at a bearable (unsuccessful) iteration over known shared object
names.
Change-Id: Id398673b938d3c3a72c24317abdbefbe793e54df
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use Python's list and dict output directly, instead of
a manually stringified version thereof. Also, report
milliseconds instead of microseconds.
Change-Id: Ibcbdea732e7ecc58fd672bc5da794832215865b4
Reviewed-by: hjk <hjk@qt.io>
They are not usable in core files.
Change-Id: I2134b61f27c27862c12a679d0acf7bebc9fcc7a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
This is a partial revert of the type id change (bd2653fb) to get
the case of virtual bases work again, as it falls back to native
field accesses everywhere we have native types.
This is likely to be a performance regression with CDB/Python,
but since this combination is experimental and not used by
default in 4.2 getting GDB/LLDB right is more important.
Medium term we might want to have a more fine-grained approach
to use of type ids (e.g. use native field accesses on a case-by
-case base only for type with virtual inheritance)
Change-Id: I239111e6ce5f3365b750068bfc4dafb12be1d53c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Move all the currentFoo initialization to DumperBase
Change-Id: I0a59715fe1550f466e78cbf678622dd8dfe1783c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
It doesn't seem to be needed anymore, and if it were, it'd be the
task of the back-end specific fromNativeType() functions to sanitize
type names.
Change-Id: I7c6af40aeacb2dbaaf73143e9fdcc1d866bf3f3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Determining dynamic type is a best-effort business that
tends to fail in setups without debug information.
Change-Id: Id24fc70ac15cf2957ed1c91d5782b8a7c0677bf2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>