]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Elide "__capability" modifier for purecap ABIs.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 29 Jul 2022 01:05:26 +0000 (18:05 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 23:47:42 +0000 (16:47 -0700)
gdb/c-typeprint.c

index 38f6d7ede9a5c7cabdf45831b75d43fa8759dd5c..41468be20c02f5f2ed9eee8d8020654c3a87c9af 100644 (file)
@@ -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, " ");