[C++] s390: Fix enum gdb_syscall conversion
Fixes: src/gdb/s390-linux-tdep.c: In function ‘gdb_syscall s390_canonicalize_syscall(int, s390_abi_kind)’: src/gdb/s390-linux-tdep.c:2622:16: error: invalid conversion from ‘int’ to ‘gdb_syscall’ [-fpermissive] return syscall; ^ src/gdb/s390-linux-tdep.c:2722:16: error: invalid conversion from ‘int’ to ‘gdb_syscall’ [-fpermissive] return syscall; ^ src/gdb/s390-linux-tdep.c:2725:24: error: invalid conversion from ‘int’ to ‘gdb_syscall’ [-fpermissive] return syscall + 2; ^ src/gdb/s390-linux-tdep.c:2728:24: error: invalid conversion from ‘int’ to ‘gdb_syscall’ [-fpermissive] return syscall + 5; ^ src/gdb/s390-linux-tdep.c:2731:24: error: invalid conversion from ‘int’ to ‘gdb_syscall’ [-fpermissive] return syscall + 6; ^ src/gdb/s390-linux-tdep.c:2734:24: error: invalid conversion from ‘int’ to ‘gdb_syscall’ [-fpermissive] return syscall + 7; ^ gdb/ChangeLog: 2015-11-19 Simon Marchi <simon.marchi@ericsson.com> Pedro Alves <palves@redhat.com> * s390-linux-tdep.c (s390_canonicalize_syscall): Add casts and intermediate 'int' variable.
This commit is contained in:
parent
f8708a1426
commit
4d1931791d
|
@ -1,3 +1,9 @@
|
||||||
|
2015-11-19 Simon Marchi <simon.marchi@ericsson.com>
|
||||||
|
Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* s390-linux-tdep.c (s390_canonicalize_syscall): Add casts and
|
||||||
|
intermediate 'int' variable.
|
||||||
|
|
||||||
2015-11-19 Pedro Alves <palves@redhat.com>
|
2015-11-19 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* linux-thread-db.c (try_thread_db_load_1): Add cast.
|
* linux-thread-db.c (try_thread_db_load_1): Add cast.
|
||||||
|
|
|
@ -2619,7 +2619,7 @@ s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
|
||||||
case 197: /* fstat64 */
|
case 197: /* fstat64 */
|
||||||
case 221: /* fcntl64 */
|
case 221: /* fcntl64 */
|
||||||
if (abi == ABI_LINUX_S390)
|
if (abi == ABI_LINUX_S390)
|
||||||
return syscall;
|
return (enum gdb_syscall) syscall;
|
||||||
return gdb_sys_no_syscall;
|
return gdb_sys_no_syscall;
|
||||||
/* These syscalls don't exist on s390. */
|
/* These syscalls don't exist on s390. */
|
||||||
case 17: /* break */
|
case 17: /* break */
|
||||||
|
@ -2717,22 +2717,29 @@ s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
|
||||||
return gdb_sys_newfstatat;
|
return gdb_sys_newfstatat;
|
||||||
/* 313+ not yet supported */
|
/* 313+ not yet supported */
|
||||||
default:
|
default:
|
||||||
/* Most "old" syscalls copied from i386. */
|
{
|
||||||
if (syscall <= 221)
|
int ret;
|
||||||
return syscall;
|
|
||||||
/* xattr syscalls. */
|
/* Most "old" syscalls copied from i386. */
|
||||||
if (syscall >= 224 && syscall <= 235)
|
if (syscall <= 221)
|
||||||
return syscall + 2;
|
ret = syscall;
|
||||||
/* timer syscalls. */
|
/* xattr syscalls. */
|
||||||
if (syscall >= 254 && syscall <= 262)
|
else if (syscall >= 224 && syscall <= 235)
|
||||||
return syscall + 5;
|
ret = syscall + 2;
|
||||||
/* mq_* and kexec_load */
|
/* timer syscalls. */
|
||||||
if (syscall >= 271 && syscall <= 277)
|
else if (syscall >= 254 && syscall <= 262)
|
||||||
return syscall + 6;
|
ret = syscall + 5;
|
||||||
/* ioprio_set .. epoll_pwait */
|
/* mq_* and kexec_load */
|
||||||
if (syscall >= 282 && syscall <= 312)
|
else if (syscall >= 271 && syscall <= 277)
|
||||||
return syscall + 7;
|
ret = syscall + 6;
|
||||||
return gdb_sys_no_syscall;
|
/* ioprio_set .. epoll_pwait */
|
||||||
|
else if (syscall >= 282 && syscall <= 312)
|
||||||
|
ret = syscall + 7;
|
||||||
|
else
|
||||||
|
ret = gdb_sys_no_syscall;
|
||||||
|
|
||||||
|
return (enum gdb_syscall) ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue