Commit 918131b6 authored by hjk's avatar hjk Committed by hjk

debugger: don't use derived dumpers if already dumping in base

Task-number: QTCREATORBUG-6857
Change-Id: Ie299a98f8e3177d730efb965f31880c6d3dfee54
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 35bcccb5
......@@ -325,6 +325,19 @@ class NoAddress:
self.d.currentPrintsAddress = self.savedPrintsAddress
class NoDynamicType:
def __init__(self, d):
self.d = d
def __enter__(self):
self.savedUseDynamicType = self.d.useDynamicType
self.d.useDynamicType = False
def __exit__(self, exType, exValue, exTraceBack):
self.d.useDynamicType = self.savedUseDynamicType
class SubItem:
def __init__(self, d, component):
self.d = d
......@@ -1760,10 +1773,11 @@ class Dumper:
# strange characters.
if dumpBase:
baseNumber += 1
with UnnamedSubItem(self, "@%d" % baseNumber):
self.put('iname="%s",' % self.currentIName)
self.put('name="%s",' % field.name)
self.putItem(value.cast(field.type))
with NoDynamicType(self):
with UnnamedSubItem(self, "@%d" % baseNumber):
self.put('iname="%s",' % self.currentIName)
self.put('name="%s",' % field.name)
self.putItem(value.cast(field.type))
elif len(field.name) == 0:
# Anonymous union. We need a dummy name to distinguish
# multiple anonymous unions in the struct.
......
......@@ -5617,6 +5617,26 @@ namespace bug6465 {
} // namespace bug6465
namespace bug6857 {
class MyFile : public QFile
{
public:
MyFile(const QString &fileName)
: QFile(fileName) {}
};
void test6857()
{
MyFile file("/tmp/tt");
BREAK_HERE;
// Expand file.
// Check file.QFile "/tmp/tt" QFile.
// Continue.
dummyStatement(&file);
}
}
namespace varargs {
void test(const char *format, ...)
......@@ -5903,6 +5923,7 @@ int main(int argc, char *argv[])
bug5799::test5799();
bug6813::test6813();
bug6465::test6465();
bug6857::test6857();
gdb13393::test13393();
gdb10586::test10586();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment