diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-11-17 16:08:18 -0800 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-11-17 16:08:18 -0800 |
commit | 92dec34206195149627768faaf5100351ecd0bbb (patch) | |
tree | c69402c7687ce4ef4ea129c211a184847360688f | |
parent | 8d9e9641f3f2e8cd9818f62b50af1a276148bdec (diff) | |
download | fsf-binutils-gdb-92dec34206195149627768faaf5100351ecd0bbb.zip fsf-binutils-gdb-92dec34206195149627768faaf5100351ecd0bbb.tar.gz fsf-binutils-gdb-92dec34206195149627768faaf5100351ecd0bbb.tar.bz2 |
Set is_tagged and FLAG_CAPABILITY in arch_capability/pointer_type.
-rw-r--r-- | gdb/gdbtypes.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 714e9bc..3f545f1 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5894,6 +5894,11 @@ arch_pointer_type (struct gdbarch *gdbarch, t = arch_type (gdbarch, TYPE_CODE_PTR, bit, name); TYPE_TARGET_TYPE (t) = target_type; t->set_is_unsigned (true); + if (bit == gdbarch_capability_bit (gdbarch)) + { + t->set_tagged(true); + t->set_instance_flags (TYPE_INSTANCE_FLAG_CAPABILITY); + } return t; } @@ -5909,6 +5914,7 @@ arch_capability_type (struct gdbarch *gdbarch, t = arch_type (gdbarch, TYPE_CODE_CAPABILITY, bit, name); t->set_is_unsigned (unsigned_p); + t->set_tagged(true); return t; } @@ -6286,28 +6292,18 @@ gdbtypes_post_init (struct gdbarch *gdbarch) builtin_type->builtin_intcap_t = arch_capability_type (gdbarch, gdbarch_capability_bit (gdbarch), 0, "__intcap_t"); - builtin_type->builtin_intcap_t->set_tagged (true); builtin_type->builtin_uintcap_t = arch_capability_type (gdbarch, gdbarch_capability_bit (gdbarch), 1, "__uintcap_t"); - builtin_type->builtin_uintcap_t->set_tagged (true); /* Capability pointer types. */ builtin_type->builtin_data_capability = arch_pointer_type (gdbarch, gdbarch_capability_bit (gdbarch), "", builtin_type->builtin_void); - builtin_type->builtin_data_capability->set_instance_flags - (builtin_type->builtin_data_capability->instance_flags () - | TYPE_INSTANCE_FLAG_CAPABILITY); - builtin_type->builtin_data_capability->set_tagged (true); builtin_type->builtin_code_capability = arch_pointer_type (gdbarch, gdbarch_capability_bit (gdbarch), "", lookup_function_type (builtin_type->builtin_void)); - builtin_type->builtin_code_capability->set_instance_flags - (builtin_type->builtin_code_capability->instance_flags () - | TYPE_INSTANCE_FLAG_CAPABILITY); - builtin_type->builtin_code_capability->set_tagged (true); } /* This type represents a GDB internal function. */ |