]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
make_capability_type: Use gdbarch_capability_bit to set size.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 6 Jul 2022 20:38:03 +0000 (13:38 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 23:43:05 +0000 (16:43 -0700)
gdb/gdbtypes.c

index d64def3ace525c0e939c122a4acd5e4d23056fce..dd4bb84924bfcfc5ca3ea032736c6695afb49e1a 100644 (file)
@@ -772,8 +772,7 @@ make_capability_type (struct type *type)
                                | TYPE_INSTANCE_FLAG_CAPABILITY),
                               NULL);
 
-  /* Capability pointers are 128-bit.  */
-  TYPE_LENGTH (ntype) = 16;
+  TYPE_LENGTH (ntype) = gdbarch_capability_bit (type->arch ()) / TARGET_CHAR_BIT;
 
   return ntype;
 }