From: Simon Marchi Date: Wed, 16 Sep 2020 20:43:39 +0000 (-0400) Subject: gdb: update instance_flags field name in gdb-gdb.py.in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d0bcfcf62dd55d7b3e2983af7075e108b3eb37c;p=binutils-gdb.git gdb: update instance_flags field name in gdb-gdb.py.in Commit 314ad88df63c ("Use type_instance_flags more throughout") changed the name of field type::instance_flags to type::m_instance_flags. It however missed changing it in the gdb-gdb.py.in file, which results in this when trying to use the pretty-printer: (top-gdb) p *val.type Traceback (most recent call last): File "/home/smarchi/build/binutils-gdb/gdb/gdb-gdb.py", line 116, in to_string % TypeFlagsPrinter(self.val['instance_flags'])) File "/home/smarchi/build/binutils-gdb/gdb/gdb-gdb.py", line 76, in __str__ flag_list = [flag.short_name for flag in TYPE_FLAGS File "/home/smarchi/build/binutils-gdb/gdb/gdb-gdb.py", line 77, in if self.val & flag.value] gdb.error: Argument to arithmetic operation not a number or boolean. $7 = This patch fixes it. gdb/ChangeLog: * gdb-gdb.py.in (class StructTypePrettyPrinter) : Change instance_flags to m_instance_flags. Change-Id: Ib5e03c08fe41ca11cd71998f2b1c58052879ce95 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a56fc5b05fa..d90cb6d90e4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-16 Simon Marchi + + * gdb-gdb.py.in (class StructTypePrettyPrinter) : + Change instance_flags to m_instance_flags. + 2020-09-16 Tom Tromey PR gdb/26598: diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in index 594592d4d16..6594ac10b85 100644 --- a/gdb/gdb-gdb.py.in +++ b/gdb/gdb-gdb.py.in @@ -113,7 +113,7 @@ class StructTypePrettyPrinter: fields.append("reference_type = %s" % self.val['reference_type']) fields.append("chain = %s" % self.val['reference_type']) fields.append("instance_flags = %s" - % TypeFlagsPrinter(self.val['instance_flags'])) + % TypeFlagsPrinter(self.val['m_instance_flags'])) fields.append("length = %d" % self.val['length']) fields.append("main_type = %s" % self.val['main_type']) return "\n{" + ",\n ".join(fields) + "}"