From 1f713e48f024e964f5a4f5468bc9506dac262763 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 12 Oct 2015 12:24:38 -0400 Subject: [PATCH] aarch64: Add cast for integer to enum cast MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c: In function ‘int aarch64_linux_syscall_record(regcache*, long unsigned int)’: /home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:904:57: error: invalid conversion from ‘long unsigned int’ to ‘aarch64_syscall’ [-fpermissive] syscall_gdb = aarch64_canonicalize_syscall (svc_number); ^ /home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:645:1: note: initializing argument 1 of ‘gdb_syscall aarch64_canonicalize_syscall(aarch64_syscall)’ aarch64_canonicalize_syscall (enum aarch64_syscall syscall_number) ^ gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_syscall_record): Add cast. --- gdb/ChangeLog | 4 ++++ gdb/aarch64-linux-tdep.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aa2a3424ff9..6825b7e7f05 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-12 Simon Marchi + + * aarch64-linux-tdep.c (aarch64_linux_syscall_record): Add cast. + 2015-10-12 Simon Marchi * aarch64-linux-tdep.c (aarch64_canonicalize_syscall): Return diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 2635adca855..2204c926df1 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -902,7 +902,8 @@ aarch64_linux_syscall_record (struct regcache *regcache, int ret = 0; enum gdb_syscall syscall_gdb; - syscall_gdb = aarch64_canonicalize_syscall (svc_number); + syscall_gdb = + aarch64_canonicalize_syscall ((enum aarch64_syscall) svc_number); if (syscall_gdb < 0) { -- 2.30.2