* [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE
@ 2024-08-04 16:18 Gustavo Romero
2024-08-04 16:18 ` [PATCH 1/3] configure: Fix arch detection " Gustavo Romero
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Gustavo Romero @ 2024-08-04 16:18 UTC (permalink / raw)
To: qemu-devel, richard.henderson; +Cc: alex.bennee, gustavo.romero
The main goal of this tiny series is to bump from 15.0. to 15.1 the GDB
version used for setting GDB_HAS_MTE=y to correctly detect GDB versions
that support all the packets necessary to run the QEMU gdbstub MTE tests
in user mode, resolving issue 2447 [0].
I took the chance to fix a bug in configure also regarding GDB_HAS_MTE,
which was being set even if the GDB available in the build env. does not
support the Aarch64 arch.
Cheers,
Gustavo
[0] https://gitlab.com/qemu-project/qemu/-/issues/2477
Gustavo Romero (3):
configure: Fix arch detection for GDB_HAS_MTE
configure: Avoid use of param. expansion when using gdb_version
configure: Fix GDB version detection for GDB_HAS_MTE
configure | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/3] configure: Fix arch detection for GDB_HAS_MTE
2024-08-04 16:18 [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE Gustavo Romero
@ 2024-08-04 16:18 ` Gustavo Romero
2024-08-04 16:18 ` [PATCH 2/3] configure: Avoid use of param. expansion when using gdb_version Gustavo Romero
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gustavo Romero @ 2024-08-04 16:18 UTC (permalink / raw)
To: qemu-devel, richard.henderson; +Cc: alex.bennee, gustavo.romero
GDB_HAS_MTE must only be set if GDB supports the aarch64 arch, so the
test if "aarch64" string is present must be against GDB-related
'$gdb_arches' variable and not against '$arch' variable.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 019fcbd0ef..a3aa257fd3 100755
--- a/configure
+++ b/configure
@@ -1673,7 +1673,7 @@ for target in $target_list; do
echo "GDB=$gdb_bin" >> $config_target_mak
fi
- if test "${arch}" = "aarch64" && version_ge ${gdb_version##* } 15.0; then
+ if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge ${gdb_version##* } 15.0; then
echo "GDB_HAS_MTE=y" >> $config_target_mak
fi
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] configure: Avoid use of param. expansion when using gdb_version
2024-08-04 16:18 [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE Gustavo Romero
2024-08-04 16:18 ` [PATCH 1/3] configure: Fix arch detection " Gustavo Romero
@ 2024-08-04 16:18 ` Gustavo Romero
2024-08-04 16:18 ` [PATCH 3/3] configure: Fix GDB version detection for GDB_HAS_MTE Gustavo Romero
2024-08-05 13:12 ` [PATCH 0/3] configure: Bump GDB detection version " Alex Bennée
3 siblings, 0 replies; 5+ messages in thread
From: Gustavo Romero @ 2024-08-04 16:18 UTC (permalink / raw)
To: qemu-devel, richard.henderson; +Cc: alex.bennee, gustavo.romero
$gdb_version is now used in more than one conditional case and its usage
in such cases may increase in the future. Therefore, avoid using shell
parameter expansion when using it by setting gdb_version to its final
form.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
configure | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index a3aa257fd3..97de85d710 100755
--- a/configure
+++ b/configure
@@ -1103,8 +1103,10 @@ fi
# gdb test
if test -n "$gdb_bin"; then
- gdb_version=$($gdb_bin --version | head -n 1)
- if version_ge ${gdb_version##* } 9.1; then
+ gdb_version_string=$($gdb_bin --version | head -n 1)
+ # Extract last field in the version string
+ gdb_version=${gdb_version_string##* }
+ if version_ge $gdb_version 9.1; then
gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
else
gdb_bin=""
@@ -1673,7 +1675,7 @@ for target in $target_list; do
echo "GDB=$gdb_bin" >> $config_target_mak
fi
- if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge ${gdb_version##* } 15.0; then
+ if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.0; then
echo "GDB_HAS_MTE=y" >> $config_target_mak
fi
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] configure: Fix GDB version detection for GDB_HAS_MTE
2024-08-04 16:18 [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE Gustavo Romero
2024-08-04 16:18 ` [PATCH 1/3] configure: Fix arch detection " Gustavo Romero
2024-08-04 16:18 ` [PATCH 2/3] configure: Avoid use of param. expansion when using gdb_version Gustavo Romero
@ 2024-08-04 16:18 ` Gustavo Romero
2024-08-05 13:12 ` [PATCH 0/3] configure: Bump GDB detection version " Alex Bennée
3 siblings, 0 replies; 5+ messages in thread
From: Gustavo Romero @ 2024-08-04 16:18 UTC (permalink / raw)
To: qemu-devel, richard.henderson; +Cc: alex.bennee, gustavo.romero
The test gdbstub/test-mte.py requires a GDB version that supports the
qIsAddressTagged packet. According to GDB NEWS [0], this packet was
first made available in the GDB 15.1 release, not in 15.0, so this
commit fixes it in configure.
[0] https://www.sourceware.org/gdb/news/
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2477
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 97de85d710..d08b71f14b 100755
--- a/configure
+++ b/configure
@@ -1675,7 +1675,7 @@ for target in $target_list; do
echo "GDB=$gdb_bin" >> $config_target_mak
fi
- if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.0; then
+ if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.1; then
echo "GDB_HAS_MTE=y" >> $config_target_mak
fi
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE
2024-08-04 16:18 [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE Gustavo Romero
` (2 preceding siblings ...)
2024-08-04 16:18 ` [PATCH 3/3] configure: Fix GDB version detection for GDB_HAS_MTE Gustavo Romero
@ 2024-08-05 13:12 ` Alex Bennée
3 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2024-08-05 13:12 UTC (permalink / raw)
To: Gustavo Romero; +Cc: qemu-devel, richard.henderson
Gustavo Romero <gustavo.romero@linaro.org> writes:
> The main goal of this tiny series is to bump from 15.0. to 15.1 the GDB
> version used for setting GDB_HAS_MTE=y to correctly detect GDB versions
> that support all the packets necessary to run the QEMU gdbstub MTE tests
> in user mode, resolving issue 2447 [0].
>
> I took the chance to fix a bug in configure also regarding GDB_HAS_MTE,
> which was being set even if the GDB available in the build env. does not
> support the Aarch64 arch.
Queued to for-9.1/misc-fixes, thanks.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-05 13:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-04 16:18 [PATCH 0/3] configure: Bump GDB detection version for GDB_HAS_MTE Gustavo Romero
2024-08-04 16:18 ` [PATCH 1/3] configure: Fix arch detection " Gustavo Romero
2024-08-04 16:18 ` [PATCH 2/3] configure: Avoid use of param. expansion when using gdb_version Gustavo Romero
2024-08-04 16:18 ` [PATCH 3/3] configure: Fix GDB version detection for GDB_HAS_MTE Gustavo Romero
2024-08-05 13:12 ` [PATCH 0/3] configure: Bump GDB detection version " Alex Bennée
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 NNTP newsgroup(s).