Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 2.2.0
-
None
-
cc43f534755f897eeea5333186b84fec91dbb8c0, f446bebadc936c7d6e3247037277e1985982f113
Description
A helper does not appear to be called correctly on a base class through a subclass (i.e. dumping the A portion of a class B that inherits from A). This appears to be due to RTTI and the use of the "dynamic_type" attribute of a GDB value with the putItem() method in dumper.py.
This can be seen by debugging main.cpp within QtCreator and setting a breakpoint at line 28 (after the constructor runs). If you create a helper for the A class and try to introspect b, without the attached fix for dumper.py, the helper for A will not be run. After the fix, a custom helper for A will be called. This problem occurs because the dynamic_type of the value representing the A base class of B resolves back to B.
The attached patch fixes this by allowing the caller of putItem() to override/disable the use of dynamic_type. This allows the code path which is handling base classes to override the behavior.