Debugger: Improve handling of imported system dumpers

At least for a few cases (std::string, vector, ...) this can succeed.

Change-Id: Idfa4ced4cb20295472d001181a83373acd89883a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-01-14 15:00:09 +01:00
parent 3476546717
commit d573195b67
3 changed files with 35 additions and 31 deletions
+6 -3
View File
@@ -171,9 +171,12 @@ class PlainDumper:
lister = getattr(printer, "children", None)
children = [] if lister is None else list(lister())
d.putType(self.printer.name)
val = printer.to_string().encode("hex")
d.putValue(val, Hex2EncodedLatin1)
d.putValue(printer.to_string())
val = printer.to_string()
if isinstance(val, str):
d.putValue(val)
else: # Assuming LazyString
d.putStdStringHelper(val.address, val.length, val.type.sizeof)
d.putNumChild(len(children))
if d.isExpanded():
with Children(d):