~ubuntu-support-team/binutils/+git/binutils-gdb:users/jhb/cheri-gdb-12-branch

Last commit made on 2022-11-18
Get this branch:
git clone -b users/jhb/cheri-gdb-12-branch https://git.launchpad.net/~ubuntu-support-team/binutils/+git/binutils-gdb

Branch merges

Branch information

Name:
users/jhb/cheri-gdb-12-branch
Repository:
lp:~ubuntu-support-team/binutils/+git/binutils-gdb

Recent commits

f7eb074... by John Baldwin <email address hidden>

RISC-V: Handle capability return values.

Add simple handling of capability function arguments (also used for
return values) and update riscv_return_value to propagate tags.

92dec34... by John Baldwin <email address hidden>

Set is_tagged and FLAG_CAPABILITY in arch_capability/pointer_type.

8d9e964... by John Baldwin <email address hidden>

Set tagged and FLAG_CAPABILITY on C++ reference types.

3028b53... by John Baldwin <email address hidden>

make_pointer_type: Set TYPE_INSTANCE_FLAG_CAPABILITY on cap pointers.

For purecap this isn't always set by DWARF attributes, and in particular
it isn't for CHERI-RISC-V.

4695a54... by John Baldwin <email address hidden>

gdb tdesc: Handle mismatched pointer register types.

In the XML target descriptions, registers can be given a type of
"code_ptr" or "data_ptr". GDB always uses the builtin type for "void
*" for these registers. However, this is wrong if the register's size
does not match (e.g. the legacy "sp" and "pc" ARM64 registers when
using a purecap binary for which "void *" is a capability). If the
sizes don't match, try to find a matching type such as "long" or
"intcap_t" to use instead.

ddd1b56... by John Baldwin <email address hidden>

CHERI-RISC-V: Improve handling of hybrid binaries.

- Add CHERI to the RISC-V ISA features if an ELF file contains the
  "xcheri" attribute. This is set in both hybrid and purecap
  ELF files. This isn't needed for purecap ELF files but does enable
  capability types and the "__capability" keyword on hybrid
  binaries and libraries.

- Add address_class gdbarch methods so that capability pointer types
  are tagged as capabilities in hybrid binaries. This is a bit gross.
  Ideally riscv_address_class_type_flags would only enable the
  TYPE_INSTANCE_FLAG_CAPABILITY if the passed in byte_size (from
  DW_ATTR_byte_size) was equal to riscv_isa_clen() (aka
  gdbarch_capability_bit()). However, for some reason this gdbarch
  method doesn't take the gdbarch member. For now, rely on the fact
  that it is only called if either there is a DW_ATTR_address_space
  attribute on a pointer, or if the byte_size doesn't match the
  default pointer size. Assuming there is no DW_ATTR_address_space
  defined for RISC-V yet, this means it should only be called for a
  size mismatch, and since we don't allow creating integer pointers in
  purecap, this means it can only be called for capability pointers
  for hybrid binaries.

5ef4317... by John Baldwin <email address hidden>

CHERI-RISC-V: Support for displaying capability attributes.

This supports both the compact format (always used for annotating
pointer variables) and the verbose format (available via set print
compact-capabilities off) when displaying individual capabilities.

2df9f9b... by John Baldwin <email address hidden>

git subrepo clone https://github.com/CTSRD-CHERI/cheri-compressed-cap gdb/cheri-compressed-cap

subrepo:
  subdir: "gdb/cheri-compressed-cap"
  merged: "6762a19ba9f"
upstream:
  origin: "https://github.com/CTSRD-CHERI/cheri-compressed-cap"
  branch: "master"
  commit: "6762a19ba9f"
git-subrepo:
  version: "0.4.3"
  origin: "???"
  commit: "???"

8ff1bd0... by John Baldwin <email address hidden>

Native support for FreeBSD CHERI-RISC-V.

d16bdb3... by John Baldwin <email address hidden>

bfd/binutils: Support for CHERI-RISC-V memory tag segments.