Improve displayed type for GDB's PlainDumper

Use the name attribute of the gdb.Type rather
than that of the pretty printer.

This e.g. displays 'std::vector<int>' rather than
just 'std::vector' for an int vector.

Change-Id: I53da01bb5ba67bcd8d7113beda6ff03e708d60f9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Michael Weghorn
2018-08-25 00:53:15 +02:00
parent a93760c789
commit 34840e8088

View File

@@ -138,7 +138,7 @@ class PlainDumper:
printer = self.printer.invoke(value.nativeValue) printer = self.printer.invoke(value.nativeValue)
lister = getattr(printer, 'children', None) lister = getattr(printer, 'children', None)
children = [] if lister is None else list(lister()) children = [] if lister is None else list(lister())
d.putType(self.printer.name) d.putType(value.nativeValue.type.name)
val = printer.to_string() val = printer.to_string()
if isinstance(val, str): if isinstance(val, str):
d.putValue(val) d.putValue(val)