aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbsupport/ChangeLog4
-rw-r--r--gdbsupport/tdesc.cc2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index d1e46a3..a77f1c9 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,7 @@
+2020-12-01 Chungyi Chi <demonic@csie.io>
+
+ * tdesc.cc (print_xml_feature::visit): Print enum size attribute.
+
2020-11-20 Tom Tromey <tromey@adacore.com>
* thread-pool.cc (thread_pool::set_thread_count): Ignore system
diff --git a/gdbsupport/tdesc.cc b/gdbsupport/tdesc.cc
index c2a3af7..2bc0247 100644
--- a/gdbsupport/tdesc.cc
+++ b/gdbsupport/tdesc.cc
@@ -351,6 +351,8 @@ void print_xml_feature::visit (const tdesc_type_with_fields *t)
break;
case TDESC_TYPE_ENUM:
+ if (t->size > 0)
+ string_appendf (tmp, " size=\"%d\"", t->size);
string_appendf (tmp, ">");
add_line (tmp);
for (const tdesc_type_field &f : t->fields)