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>
Also adding a test covering this dumper.
Change-Id: I491dd87e52f65bf3faf21d81436f264507bf0b51
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
libUtils nowadays depends on Qt Declarative, which is not necessarily
present in pure test setups.
Change-Id: I8c40d086186ccf047c034345126f088f53652dbb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Accidentally leaving out the comma was a needless extra source of errors
shifted from compile to (test) run time.
Change-Id: I02db60b5e4648545cb869738d009b91720827f93
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>
1f29242276 used the correct form for
CONFIG -= qt.
This revealed several cases that are missing CoreProfile configuration.
Change-Id: I8bb6d5156eb6beba91a8df7b948832f1e043d64f
Reviewed-by: hjk <hjk@qt.io>
QTC_LIB_DEPENDS has to be set before including qttest.pri
Change-Id: Ie455b7341a2d79d74e3bf6f9f9d39ce8a7539e6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Test checks that the dumper doesn't go through the slow "iterate
through every type defined in target" dumper path.
Done-by: Alexandru Croitor
Change-Id: I4e1aea22ea2912467635f2e62fe1f6b2aa58e897
Reviewed-by: hjk <hjk@qt.io>
Helps building tests in restricted environments.
Change-Id: Ic12b8e011555735a6539a8aba1e9e55b321dfbc2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>