Ignore static members in NoOpStructPrinter

Hannes' patch to show local variables in the TUI pointed out that
NoOpStructPrinter should ignore static members.  This patch implements
this.
This commit is contained in:
Tom Tromey
2023-11-13 14:03:58 -07:00
parent cfd00e8050
commit 4a1b9a4bad
3 changed files with 21 additions and 2 deletions

View File

@@ -350,7 +350,7 @@ class NoOpStructPrinter(gdb.ValuePrinter):
def children(self):
for field in self.__ty.fields():
if field.name is not None:
if hasattr(field, "bitpos") and field.name is not None:
yield (field.name, self.__value[field])