From: John Baldwin Date: Wed, 31 Aug 2022 21:09:11 +0000 (-0700) Subject: Don't treat *intcap_t as pointers. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f708a5f0080bb9243281ec477ec8ee686647d4c;p=thirdparty%2Fbinutils-gdb.git Don't treat *intcap_t as pointers. 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. --- diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 013938648fb..640e20d7bfd 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -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.