binutils-gdb/gdb/arch
Luis Machado 68cffbbd44 [AArch64] MTE corefile support
Teach GDB how to dump memory tags for AArch64 when using the gcore command
and how to read memory tag data back from a core file generated by GDB
(via gcore) or by the Linux kernel.

The format is documented in the Linux Kernel documentation [1].

Each tagged memory range (listed in /proc/<pid>/smaps) gets dumped to its
own PT_AARCH64_MEMTAG_MTE segment. A section named ".memtag" is created for each
of those segments when reading the core file back.

To save a little bit of space, given MTE tags only take 4 bits, the memory tags
are stored packed as 2 tags per byte.

When reading the data back, the tags are unpacked.

I've added a new testcase to exercise the feature.

Build-tested with --enable-targets=all and regression tested on aarch64-linux
Ubuntu 20.04.

[1] Documentation/arm64/memory-tagging-extension.rst (Core Dump Support)
2022-07-19 15:24:31 +01:00
..
aarch32.c
aarch32.h
aarch64-insn.c
aarch64-insn.h
aarch64-mte-linux.c [AArch64] MTE corefile support 2022-07-19 15:24:31 +01:00
aarch64-mte-linux.h [AArch64] MTE corefile support 2022-07-19 15:24:31 +01:00
aarch64.c
aarch64.h
amd64.c
amd64.h
arc.c
arc.h
arm-get-next-pcs.c
arm-get-next-pcs.h
arm-linux.c
arm-linux.h
arm.c
arm.h
i386.c
i386.h
loongarch.c gdb: LoongArch: Add floating-point support 2022-07-12 20:14:48 +08:00
loongarch.h gdb: LoongArch: Add floating-point support 2022-07-12 20:14:48 +08:00
ppc-linux-common.c
ppc-linux-common.h
ppc-linux-tdesc.h
riscv.c
riscv.h
tic6x.c
tic6x.h
xtensa.h