]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Don't treat *intcap_t as pointers.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 31 Aug 2022 21:09:11 +0000 (14:09 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 23:47:42 +0000 (16:47 -0700)
TYPE_CODE_CAPABILITY is used for intcap_t and uintcap_t, whereas
capability-sized pointers use TYPE_CODE_PTR with the TYPE_CAPABILITY
flag.  This avoids trying to indirect scalar capability values in
some places.  Cosmetically it stops the output of the '(intcap_t)'
prefixes in front of capability values.

gdb/gdbtypes.h

index 013938648fb19aebca55ade3578dbc88f4272c4c..640e20d7bfd12e3275d6527a34ac53954eb57b83 100644 (file)
@@ -1486,8 +1486,7 @@ struct type
   /* Return true if this is a pointer or reference type.  */
   bool is_pointer_or_reference () const
   {
-    return this->code () == TYPE_CODE_PTR
-      || this->code () == TYPE_CODE_CAPABILITY || TYPE_IS_REFERENCE (this);
+    return this->code () == TYPE_CODE_PTR || TYPE_IS_REFERENCE (this);
   }
 
   /* * Type that is a pointer to this type.