[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/4] gdbstub: Add support for MTE in system mode
From: |
Gustavo Romero |
Subject: |
[PATCH 0/4] gdbstub: Add support for MTE in system mode |
Date: |
Mon, 22 Jul 2024 16:07:05 +0000 |
This patchset makes handle_q_memtag, handle_q_isaddresstagged, and
handle_Q_memtag stubs build for system mode, allowing all GDB
'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system
mode.
It also extends the MTE gdbstub tests to run in system mode, sharing the
tests between user mode and system mode.
For running the tests, a GDB that supports MTE for baremetal targets is
necessary. The patch for this support is currently under review [0].
For convenience, this patch is available in this GDB branch [1], and GDB
can be built and installed into a /tmp directory in a straightforward
way. After cloning [1], in a 'build' directory, configure GDB to build:
$ git clone --depth 1 https://github.com/gromero/binutils-gdb.git --branch
mte_baremetal mte_baremetal && cd mte_baremetal
$ mkdir build && cd build
$ ../configure --disable-binutils --disable-ld --disable-gold --disable-gas
--disable-sim --disable-gprof --disable-gprofng --with-python=python3
--enable-libctf --enable-unit-tests --prefix=/tmp/gdb
--with-additional-debug-dirs=/usr/lib/debug --enable-targets=all
$ make -j 32
$ make install
Configure QEMU, specifying where GDB is installed. For example:
$ cd build
$ ../configure --target-list=aarch64-linux-user,aarch64-softmmu --disable-docs
--gdb=/tmp/gdb/bin/gdb
$ make -j 32
$ cd..
And, finally, run the MTE gdbstub tests for system mode:
$ make -C build -j 32 run-tcg-tests-aarch64-softmmu
Cheers,
Gustavo
[0] https://sourceware.org/pipermail/gdb-patches/2024-July/210584.html
[1] https://github.com/gromero/binutils-gdb/tree/mte_baremetal
Gustavo Romero (4):
gdbstub: Use specific MMU index when probing MTE addresses
gdbstub: Add support for MTE in system mode
tests/guest-debug: Support passing arguments to the GDB test script
tests/tcg/aarch64: Extend MTE gdbstub tests to system mode
target/arm/gdbstub64.c | 21 +++++++----
tests/guest-debug/run-test.py | 4 +++
tests/tcg/aarch64/Makefile.softmmu-target | 36 +++++++++++++++++--
tests/tcg/aarch64/Makefile.target | 3 +-
tests/tcg/aarch64/gdbstub/test-mte.py | 44 +++++++++++++++--------
tests/tcg/aarch64/system/boot.S | 26 ++++++++++++--
tests/tcg/aarch64/system/kernel.ld | 5 +++
tests/tcg/aarch64/system/mte.c | 40 +++++++++++++++++++++
8 files changed, 151 insertions(+), 28 deletions(-)
create mode 100644 tests/tcg/aarch64/system/mte.c
--
2.34.1
- [PATCH 0/4] gdbstub: Add support for MTE in system mode,
Gustavo Romero <=