forked from qt-creator/qt-creator
Debugger: Filter out well-known static variables
Change-Id: I2c95ab4ab7f765ad42bf6bd35c6f790de5f03668 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1066,7 +1066,22 @@ class Dumper(DumperBase):
|
|||||||
self.anonNumber = 0
|
self.anonNumber = 0
|
||||||
shadowed = {}
|
shadowed = {}
|
||||||
ids = {} # Filter out duplicates entries at the same address.
|
ids = {} # Filter out duplicates entries at the same address.
|
||||||
values = list(frame.GetVariables(True, True, True, False))
|
values = list(frame.GetVariables(True, True, False, False))
|
||||||
|
|
||||||
|
# We need to look at static variables to get access to
|
||||||
|
# local constants. But not at all of them.
|
||||||
|
for staticVar in frame.GetVariables(False, False, True, False):
|
||||||
|
typename = staticVar.GetType().GetName()
|
||||||
|
name = staticVar.GetName()
|
||||||
|
if name.startswith("qt_meta_stringdata_"):
|
||||||
|
continue
|
||||||
|
if name.startswith("qt_meta_data_"):
|
||||||
|
continue
|
||||||
|
if name.endswith("::staticMetaObject") \
|
||||||
|
and typename.endswith("QMetaObject"):
|
||||||
|
continue
|
||||||
|
values.append(staticVar)
|
||||||
|
|
||||||
values.reverse() # To get shadowed vars numbered backwards.
|
values.reverse() # To get shadowed vars numbered backwards.
|
||||||
for value in values:
|
for value in values:
|
||||||
if not value.IsValid():
|
if not value.IsValid():
|
||||||
|
|||||||
Reference in New Issue
Block a user