[Debugger] Add dumpers for Python "PyObject"s

The dumper calls PyObject_Repr and shows the result of that as the
value of a PyObject.

It also adds three new sub fields to show the object class (type),
super class (base class), and the meta type (the type of the class
object).

Change-Id: I0612833321f6d2b50826588e775cfa12e1db28e4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alexandru Croitor
2018-10-17 16:05:14 +02:00
parent 99d65ffba5
commit 89fe2681f7
5 changed files with 197 additions and 2 deletions
+7
View File
@@ -1127,6 +1127,13 @@ class Dumper(DumperBase):
self.setVariableFetchingOptions(args)
# Reset certain caches whenever a step over / into / continue
# happens.
# FIXME: Caches are currently also cleared if currently
# selected frame is changed, that shouldn't happen.
if not self.partialVariable:
self.resetPerStepCaches()
anyModule = self.target.GetModuleAtIndex(0)
anySymbol = anyModule.GetSymbolAtIndex(0)
self.fakeAddress = int(anySymbol.GetStartAddress())