aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2021-01-02 17:35:25 +0100
committerHannes Domani <ssbssa@yahoo.de>2021-01-02 19:47:53 +0100
commitb66b4e658f4d44cbbd654452c019fbbe85a098c9 (patch)
tree5e5a16ba7b6a8e8c015728697eafd56fb09cb979 /gdb
parent4258df85f13dbaf9a1cb5b523bf2b9d390b25e69 (diff)
downloadfsf-binutils-gdb-b66b4e658f4d44cbbd654452c019fbbe85a098c9.zip
fsf-binutils-gdb-b66b4e658f4d44cbbd654452c019fbbe85a098c9.tar.gz
fsf-binutils-gdb-b66b4e658f4d44cbbd654452c019fbbe85a098c9.tar.bz2
Fix pretty printer of main_type.flds_bnds.bounds
In struct dynamic_prop the members kind and data were renamed to m_kind and m_data. And flag_upper_bound_is_count is actually in bounds directly, not in its high member. gdb/ChangeLog: 2021-01-02 Hannes Domani <ssbssa@yahoo.de> * gdb-gdb.py.in: Fix main_type.flds_bnds.bounds pretty printer.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/gdb-gdb.py.in11
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fb8c3c9..6fce234 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-02 Hannes Domani <ssbssa@yahoo.de>
+
+ * gdb-gdb.py.in: Fix main_type.flds_bnds.bounds pretty printer.
+
2021-01-01 Joel Brobecker <brobecker@adacore.com>
* gdbarch.sh: Update copyright year range.
diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in
index 3f959c7..2b1c7de 100644
--- a/gdb/gdb-gdb.py.in
+++ b/gdb/gdb-gdb.py.in
@@ -183,17 +183,18 @@ class StructMainTypePrettyPrinter:
def bound_img(self, bound_name):
"""Return an image of the given main_type's bound."""
- b = self.val['flds_bnds']['bounds'].dereference()[bound_name]
- bnd_kind = str(b['kind'])
+ bounds = self.val['flds_bnds']['bounds'].dereference()
+ b = bounds[bound_name]
+ bnd_kind = str(b['m_kind'])
if bnd_kind == 'PROP_CONST':
- return str(b['data']['const_val'])
+ return str(b['m_data']['const_val'])
elif bnd_kind == 'PROP_UNDEFINED':
return '(undefined)'
else:
info = [bnd_kind]
- if bound_name == 'high' and b['flag_upper_bound_is_count']:
+ if bound_name == 'high' and bounds['flag_upper_bound_is_count']:
info.append('upper_bound_is_count')
- return '{} ({})'.format(str(b['data']['baton']), ','.join(info))
+ return '{} ({})'.format(str(b['m_data']['baton']), ','.join(info))
def bounds_img(self):
"""Return an image of the main_type bounds.