From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 0/2] Fix bug in aarch64-linux GDB when inferior changes SVE vector length
Date: Fri, 5 Aug 2022 00:46:46 +0000 [thread overview]
Message-ID: <20220805004648.111358-1-thiago.bauermann@linaro.org> (raw)
Hello,
This version addresses Luis' review comments on v1. Built with
“--enable-targets=all” and regression tested on aarch64-linux native on
Ubuntu 20.04.
Changes since v1:
- Patch “gdb/aarch64: Fix thread's gdbarch when SVE vector length changes”
- Use aarch64_read_description () (which caches descriptions) to get the
new target description.
- Simplify aarch64_features_from_target_desc () a little bit by using the
existing aarch64_get_tdesc_vq (). In v1, the former duplicated the
latter's logic.
- Remove from aarch64_gdbarch_init () code which tries to read vq from
struct gdbarch_info.id. It was dead code in v1. This also allows
simplifying the if block a bit further down for the case where tdesc
doesn't have registers.
- Remove the id member of struct gdbarch_info, since this patch removes
its only user.
- Patch “gdb/testsuite: Add test for AArch64 Scalable Vector Extension”
- Remove mention of QEMU's copyright statement.
- Use the GNU Coding Style in the C file.
- Be more specific about what the test does in the Tcl file.
- Use skip_aarch64_sve_tests to exit early if SVE isn't supported.
- Use “info all-registers” rather than “info registers” to check whether
all registers are there after the vector length changes. This makes the
test take ~15s rather than ~4s. I assume this isn't a problem.
- Test that the new vector length is reflected in the $vg register.
- Test that the new vector length is reflected in the size of the $z[0-31]
registers.
- Loop the same number of iterations that the inferior is supposed to
loop.
- Add small comment documenting the count_newlines procedure.
Original cover letter below:
While working on gdbserver support for the case where the inferior changes
the SVE vector length, I noticed this problem in the GDB native handling of
the same scenario.
Here's a fix and a testcase which fails without the fix, and passes with it.
Regression tested on aarch64-linux native on Ubuntu 20.04.
Thiago Jung Bauermann (2):
gdb/aarch64: Fix thread's gdbarch when SVE vector length changes
gdb/testsuite: Add test for AArch64 Scalable Vector Extension
gdb/aarch64-linux-nat.c | 11 ++-
gdb/aarch64-tdep.c | 41 +++++-----
gdb/aarch64-tdep.h | 2 +
gdb/gdbarch.h | 13 +---
gdb/testsuite/gdb.arch/aarch64-sve.c | 64 ++++++++++++++++
gdb/testsuite/gdb.arch/aarch64-sve.exp | 101 +++++++++++++++++++++++++
gdb/testsuite/lib/gdb.exp | 6 ++
gdb/testsuite/lib/mi-support.exp | 4 -
8 files changed, 207 insertions(+), 35 deletions(-)
create mode 100644 gdb/testsuite/gdb.arch/aarch64-sve.c
create mode 100644 gdb/testsuite/gdb.arch/aarch64-sve.exp
next reply other threads:[~2022-08-05 0:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 0:46 Thiago Jung Bauermann [this message]
2022-08-05 0:46 ` [PATCH v2 1/2] gdb/aarch64: Fix thread's gdbarch when SVE vector length changes Thiago Jung Bauermann
2022-08-05 17:26 ` Luis Machado
2022-08-05 0:46 ` [PATCH v2 2/2] gdb/testsuite: Add test for AArch64 Scalable Vector Extension Thiago Jung Bauermann
2022-08-05 17:23 ` Luis Machado
2022-08-05 21:57 ` Thiago Jung Bauermann
2022-08-17 20:46 ` Thiago Jung Bauermann
2022-08-18 8:56 ` Luis Machado
2022-08-18 11:37 ` Thiago Jung Bauermann
2022-08-18 13:47 ` Luis Machado
2022-08-18 14:08 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220805004648.111358-1-thiago.bauermann@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).