diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2021-02-08 21:24:52 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2021-03-09 11:03:26 +0000 |
commit | fbb1aacebac7d1fd556cf9c46e9af89aaaa62398 (patch) | |
tree | 044e79d9b46d403295673509fd6a6d4a4fba88a1 /gdb/gdb-gdb.py.in | |
parent | 611aa09d994fc5a8a9444075e65f0d6d4ebf4922 (diff) | |
download | binutils-gdb-fbb1aacebac7d1fd556cf9c46e9af89aaaa62398.tar.gz |
gdb: fix field names of GDB's type main_type structure
In commit:
commit 5b7d941b90d1a232dc144dc14850dd2fb63c35da
Date: Fri Jan 22 12:21:09 2021 -0500
gdb: add owner-related methods to struct type
two fields of struct maint_type were renamed. 'flag_objfile_owned'
became 'm_flag_objfile_owned' and 'owner' became 'm_owner'. Update
our python helper script to take this into account.
I've added a basic test that uses the self-test framework to load the
pretty printers, and print a type.
The test relies on stopping in GDB's `value_print` function.
gdb/ChangeLog:
* gdb-gdb.py.in (StructMainTypePrettyPrinter) <owner_to_string>:
Updated fields names flag_objfile_owned to m_flag_objfile_owned,
and owner to m_owner.
gdb/testsuite/ChangeLog:
* gdb.gdb/python-helper.exp: New file.
Diffstat (limited to 'gdb/gdb-gdb.py.in')
-rw-r--r-- | gdb/gdb-gdb.py.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in index 2b1c7ded4b6..f58b3073d5c 100644 --- a/gdb/gdb-gdb.py.in +++ b/gdb/gdb-gdb.py.in @@ -142,10 +142,10 @@ class StructMainTypePrettyPrinter: def owner_to_string(self): """Return an image of component "owner". """ - if self.val['flag_objfile_owned'] != 0: - return "%s (objfile)" % self.val['owner']['objfile'] + if self.val['m_flag_objfile_owned'] != 0: + return "%s (objfile)" % self.val['m_owner']['objfile'] else: - return "%s (gdbarch)" % self.val['owner']['gdbarch'] + return "%s (gdbarch)" % self.val['m_owner']['gdbarch'] def struct_field_location_img(self, field_val): """Return an image of the loc component inside the given field |