From fa4c1b42280912a1196322c9155475278de5b035 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 28 Jul 2022 18:05:26 -0700 Subject: [PATCH] Elide "__capability" modifier for purecap ABIs. --- gdb/c-typeprint.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 38f6d7ede9a..41468be20c0 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -23,6 +23,7 @@ #include "gdbtypes.h" #include "expression.h" #include "value.h" +#include "gdbarch.h" #include "gdbcore.h" #include "target.h" #include "language.h" @@ -529,7 +530,9 @@ c_type_print_modifier (struct type *type, struct ui_file *stream, did_print_modifier = 1; } - if (TYPE_CAPABILITY (type)) + gdbarch *gdbarch = type->arch (); + if (TYPE_CAPABILITY (type) + && gdbarch_ptr_bit (gdbarch) != gdbarch_capability_bit (gdbarch)) { if (did_print_modifier || need_pre_space) fprintf_filtered (stream, " "); -- 2.47.2