aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-12-18 18:15:06 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-12-24 16:45:39 +0000
commit5ba3b20ec23816e07ecc5ce58bc7585f371e2f8c (patch)
tree05ea7141301b237f5c5ddff4d673044edcc39cb4 /gdb
parentf8676776828c6c0c26da31de0de68c0f4162a8e9 (diff)
downloadbinutils-5ba3b20ec23816e07ecc5ce58bc7585f371e2f8c.zip
binutils-5ba3b20ec23816e07ecc5ce58bc7585f371e2f8c.tar.gz
binutils-5ba3b20ec23816e07ecc5ce58bc7585f371e2f8c.tar.bz2
gdb: include allocated/associated properties in 'maint print type'
Adds the allocated and associated dynamic properties into the output of the 'maintenance print type' command. gdb/ChangeLog: * gdbtypes (recursive_dump_type): Include allocated and associated properties.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbtypes.c18
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ac4caf0..d4352a8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdbtypes (recursive_dump_type): Include allocated and associated
+ properties.
+
2020-12-24 Lancelot SIX <lsix@lancelotsix.com>
* gdbtypes.c (is_scalar_type_recursive): Prevent comparison
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a6589c4..35e993b 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -5271,6 +5271,24 @@ recursive_dump_type (struct type *type, int spaces)
}
puts_filtered ("\n");
printf_filtered ("%*snfields %d ", spaces, "", type->num_fields ());
+ if (TYPE_ASSOCIATED_PROP (type) != nullptr
+ || TYPE_ALLOCATED_PROP (type) != nullptr)
+ {
+ printf_filtered ("%*s", spaces, "");
+ if (TYPE_ASSOCIATED_PROP (type) != nullptr)
+ {
+ printf_filtered ("associated ");
+ dump_dynamic_prop (*TYPE_ASSOCIATED_PROP (type));
+ }
+ if (TYPE_ALLOCATED_PROP (type) != nullptr)
+ {
+ if (TYPE_ASSOCIATED_PROP (type) != nullptr)
+ printf_filtered (" ");
+ printf_filtered ("allocated ");
+ dump_dynamic_prop (*TYPE_ALLOCATED_PROP (type));
+ }
+ printf_filtered ("\n");
+ }
gdb_print_host_address (type->fields (), gdb_stdout);
puts_filtered ("\n");
for (idx = 0; idx < type->num_fields (); idx++)