From: Thiago Jung Bauermann Date: Thu, 11 Sep 2025 01:46:07 +0000 (-0300) Subject: GDB: aarch64: Use GCS features to calculate hash of struct aarch64_features X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86e6907244c89bde0d1584dbcbd617b53319d0f9;p=thirdparty%2Fbinutils-gdb.git GDB: aarch64: Use GCS features to calculate hash of struct aarch64_features Luis noticed that when adding the gcs and gcs_linux members to struct aarch64_features in my Guarded Control Stack patch series, I neglected to modify struct hash::operator() to take them into account when computing its hash. This can cause GDB to use the wrong aarch64_features object during a debugging session. Regression tested on aarch64-linux-gnu. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33440 Suggested-by: Luis Machado Approved-By: Luis Machado --- diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h index 679d845df74..0fcdba7fb7d 100644 --- a/gdb/arch/aarch64.h +++ b/gdb/arch/aarch64.h @@ -94,6 +94,10 @@ namespace std /* SME2 feature. */ h = h << 1 | features.sme2; + + h = h << 1 | features.gcs; + h = h << 1 | features.gcs_linux; + return h; } };