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<aarch64_features>::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 <luis.machado.foss@gmail.com>
Approved-By: Luis Machado <luis.machado.foss@gmail.com>
This commit is contained in:
Thiago Jung Bauermann
2025-09-10 22:46:07 -03:00
parent b1e2056e37
commit 86e6907244

View File

@@ -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;
}
};