gdbsupport/tdesc: print enum size attribute
authorChungyi Chi <demonic@csie.io>
Tue, 1 Dec 2020 11:06:08 +0000 (11:06 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 1 Dec 2020 11:22:24 +0000 (11:22 +0000)
commit4f36e61b2dee8de793b09670378229dfe2750803
tree22721b8ede1760c8b18fb6db5f9e3ddcf98c5f77
parent6729e2c2af2bd94408430734316597843718a484
gdbsupport/tdesc: print enum size attribute

According to gdb online docs[1], XML target description enum types
have both name and size attributes.  Currently GDB does not print the
size attribute.  This commit fixes this.  This change will be visible
in the output of the command `maint print xml-tdesc`.

There are other bugs with the print of enum types in XML target
descriptions, the next commit will fix these and include a test that
covers this patch.

[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Enum-Target-Types.html#Enum-Target-Types

gdbsupport/ChangeLog:

* tdesc.cc (print_xml_feature::visit): Print enum size attribute.
gdbsupport/ChangeLog
gdbsupport/tdesc.cc