aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>2025-09-04 13:50:44 -0300
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>2025-09-04 19:54:31 -0300
commit11d649801563e8ee26b8f0c227c115bca55abc0c (patch)
tree97076526703feec1be20f074780229d014805594 /gdb
parent44f37db2c640e4b603755bb342501f640584167e (diff)
downloadgdb-11d649801563e8ee26b8f0c227c115bca55abc0c.zip
gdb-11d649801563e8ee26b8f0c227c115bca55abc0c.tar.gz
gdb-11d649801563e8ee26b8f0c227c115bca55abc0c.tar.bz2
GDB: aarch64-linux: Define HWCAP_GCS as unsigned long long value
On platforms where long is 32 bits, this change fixes a build failure: /home/linux/arm/gdb/src/gdb/aarch64-linux-tdep.c: In function ‘const target_desc* aarch64_linux_core_read_description(gdbarch*, target_ops*, bfd*)’: /home/linux/arm/gdb/src/gdb/arch/aarch64-gcs-linux.h:27:24: error: left shift count >= width of type [-Werror=shift-count-overflow] 27 | #define HWCAP_GCS (1UL << 32) | ~~~~^~~~~ /home/linux/arm/gdb/src/gdb/aarch64-linux-tdep.c:1714:47: note: in expansion of macro ‘HWCAP_GCS’ 1714 | features.gcs = features.gcs_linux = hwcap & HWCAP_GCS; | ^~~~~~~~~ Suggested-by: Tom de Vries <tdevries@suse.de> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33372
Diffstat (limited to 'gdb')
-rw-r--r--gdb/arch/aarch64-gcs-linux.h2
-rw-r--r--gdb/testsuite/gdb.arch/aarch64-gcs-core.c2
-rw-r--r--gdb/testsuite/gdb.arch/aarch64-gcs-disp-step.c2
-rw-r--r--gdb/testsuite/gdb.arch/aarch64-gcs-return.c2
-rw-r--r--gdb/testsuite/gdb.arch/aarch64-gcs.c2
-rw-r--r--gdb/testsuite/lib/gdb.exp2
6 files changed, 6 insertions, 6 deletions
diff --git a/gdb/arch/aarch64-gcs-linux.h b/gdb/arch/aarch64-gcs-linux.h
index 922c779..018ca37 100644
--- a/gdb/arch/aarch64-gcs-linux.h
+++ b/gdb/arch/aarch64-gcs-linux.h
@@ -24,7 +24,7 @@
/* Feature check for Guarded Control Stack. */
#ifndef HWCAP_GCS
-#define HWCAP_GCS (1UL << 32)
+#define HWCAP_GCS (1ULL << 32)
#endif
/* Make sure we only define these if the kernel header doesn't. */
diff --git a/gdb/testsuite/gdb.arch/aarch64-gcs-core.c b/gdb/testsuite/gdb.arch/aarch64-gcs-core.c
index 7767204..f3362cb 100644
--- a/gdb/testsuite/gdb.arch/aarch64-gcs-core.c
+++ b/gdb/testsuite/gdb.arch/aarch64-gcs-core.c
@@ -23,7 +23,7 @@
/* Feature check for Guarded Control Stack. */
#ifndef HWCAP_GCS
-#define HWCAP_GCS (1UL << 32)
+#define HWCAP_GCS (1ULL << 32)
#endif
#ifndef PR_GET_SHADOW_STACK_STATUS
diff --git a/gdb/testsuite/gdb.arch/aarch64-gcs-disp-step.c b/gdb/testsuite/gdb.arch/aarch64-gcs-disp-step.c
index 3d89535..754fda1 100644
--- a/gdb/testsuite/gdb.arch/aarch64-gcs-disp-step.c
+++ b/gdb/testsuite/gdb.arch/aarch64-gcs-disp-step.c
@@ -23,7 +23,7 @@
/* Feature check for Guarded Control Stack. */
#ifndef HWCAP_GCS
-#define HWCAP_GCS (1UL << 32)
+#define HWCAP_GCS (1ULL << 32)
#endif
#ifndef PR_GET_SHADOW_STACK_STATUS
diff --git a/gdb/testsuite/gdb.arch/aarch64-gcs-return.c b/gdb/testsuite/gdb.arch/aarch64-gcs-return.c
index 95518b6..c062fea 100644
--- a/gdb/testsuite/gdb.arch/aarch64-gcs-return.c
+++ b/gdb/testsuite/gdb.arch/aarch64-gcs-return.c
@@ -23,7 +23,7 @@
/* Feature check for Guarded Control Stack. */
#ifndef HWCAP_GCS
-#define HWCAP_GCS (1UL << 32)
+#define HWCAP_GCS (1ULL << 32)
#endif
#ifndef PR_GET_SHADOW_STACK_STATUS
diff --git a/gdb/testsuite/gdb.arch/aarch64-gcs.c b/gdb/testsuite/gdb.arch/aarch64-gcs.c
index 39519e4..9eb2e9e 100644
--- a/gdb/testsuite/gdb.arch/aarch64-gcs.c
+++ b/gdb/testsuite/gdb.arch/aarch64-gcs.c
@@ -24,7 +24,7 @@
/* Feature check for Guarded Control Stack. */
#ifndef HWCAP_GCS
-#define HWCAP_GCS (1UL << 32)
+#define HWCAP_GCS (1ULL << 32)
#endif
#ifndef PR_GET_SHADOW_STACK_STATUS
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 5ba1c90..fe4178e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5351,7 +5351,7 @@ gdb_caching_proc allow_aarch64_gcs_tests {} {
/* Feature check for Guarded Control Stack. */
#ifndef HWCAP_GCS
- #define HWCAP_GCS (1UL << 32)
+ #define HWCAP_GCS (1ULL << 32)
#endif
int main (void) {