forked from qt-creator/qt-creator
Debugger: Don't try to iterate on non-existent subprinters
gobject_gdb.py puts the pretty_printer_lookup function into gdb.pretty_printers. Trying to access subprinters of it causes the AttributeError exception. Change-Id: I00ce7b62866dd9c06a1f0abef0c7043ece023d34 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1004,8 +1004,11 @@ class Dumper(DumperBase):
|
|||||||
|
|
||||||
def importPlainDumpersForObj(self, obj):
|
def importPlainDumpersForObj(self, obj):
|
||||||
for printers in obj.pretty_printers + gdb.pretty_printers:
|
for printers in obj.pretty_printers + gdb.pretty_printers:
|
||||||
|
if hasattr(printers, "subprinters"):
|
||||||
for printer in printers.subprinters:
|
for printer in printers.subprinters:
|
||||||
self.importPlainDumper(printer)
|
self.importPlainDumper(printer)
|
||||||
|
else:
|
||||||
|
self.warn('Loading a printer without the subprinters attribute not supported.')
|
||||||
|
|
||||||
def importPlainDumpers(self):
|
def importPlainDumpers(self):
|
||||||
for obj in gdb.objfiles():
|
for obj in gdb.objfiles():
|
||||||
|
Reference in New Issue
Block a user