From 09ed8bbf8e78a8c201145e1292dbaa89490a0b27 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 6 Jul 2022 13:38:03 -0700 Subject: [PATCH] make_capability_type: Use gdbarch_capability_bit to set size. --- gdb/gdbtypes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index d64def3ace5..dd4bb84924b 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -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; } -- 2.47.2