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 Add an arm-tls feature which includes the tpidruro register from CP15. 2022-05-03 16:05:10 -07:00
aarch32.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
aarch64-insn.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
aarch64-insn.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
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 Use aarch64_features to describe register features in target descriptions. 2022-05-18 13:32:04 -07:00
aarch64.h Tweak the std::hash<> specialization for aarch64_features. 2022-05-23 11:02:55 -07:00
amd64.c gdb: Consolidate 32bit-pkeys.xml and 64bit-pkeys.xml 2022-03-31 10:25:26 -07:00
amd64.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arc.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arc.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-get-next-pcs.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-get-next-pcs.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-linux.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm-linux.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
arm.c Add an arm-tls feature which includes the tpidruro register from CP15. 2022-05-03 16:05:10 -07:00
arm.h gdb/arm: Only stack S16..S31 when FPU registers are secure 2022-06-29 14:03:26 +02:00
i386.c gdb: Consolidate 32bit-pkeys.xml and 64bit-pkeys.xml 2022-03-31 10:25:26 -07:00
i386.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
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 Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ppc-linux-common.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ppc-linux-tdesc.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
riscv.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
riscv.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
tic6x.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
tic6x.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
xtensa.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00