• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision4d1931791d0aca95ce82d5391f03b31613d9173b (tree)
l'heure2015-11-19 23:32:53
AuteurSimon Marchi <simon.marchi@eric...>
CommiterPedro Alves

Message de Log

[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.

Change Summary

Modification

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
1+2015-11-19 Simon Marchi <simon.marchi@ericsson.com>
2+ Pedro Alves <palves@redhat.com>
3+
4+ * s390-linux-tdep.c (s390_canonicalize_syscall): Add casts and
5+ intermediate 'int' variable.
6+
17 2015-11-19 Pedro Alves <palves@redhat.com>
28
39 * linux-thread-db.c (try_thread_db_load_1): Add cast.
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -2619,7 +2619,7 @@ s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
26192619 case 197: /* fstat64 */
26202620 case 221: /* fcntl64 */
26212621 if (abi == ABI_LINUX_S390)
2622- return syscall;
2622+ return (enum gdb_syscall) syscall;
26232623 return gdb_sys_no_syscall;
26242624 /* These syscalls don't exist on s390. */
26252625 case 17: /* break */
@@ -2717,22 +2717,29 @@ s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
27172717 return gdb_sys_newfstatat;
27182718 /* 313+ not yet supported */
27192719 default:
2720- /* Most "old" syscalls copied from i386. */
2721- if (syscall <= 221)
2722- return syscall;
2723- /* xattr syscalls. */
2724- if (syscall >= 224 && syscall <= 235)
2725- return syscall + 2;
2726- /* timer syscalls. */
2727- if (syscall >= 254 && syscall <= 262)
2728- return syscall + 5;
2729- /* mq_* and kexec_load */
2730- if (syscall >= 271 && syscall <= 277)
2731- return syscall + 6;
2732- /* ioprio_set .. epoll_pwait */
2733- if (syscall >= 282 && syscall <= 312)
2734- return syscall + 7;
2735- return gdb_sys_no_syscall;
2720+ {
2721+ int ret;
2722+
2723+ /* Most "old" syscalls copied from i386. */
2724+ if (syscall <= 221)
2725+ ret = syscall;
2726+ /* xattr syscalls. */
2727+ else if (syscall >= 224 && syscall <= 235)
2728+ ret = syscall + 2;
2729+ /* timer syscalls. */
2730+ else if (syscall >= 254 && syscall <= 262)
2731+ ret = syscall + 5;
2732+ /* mq_* and kexec_load */
2733+ else if (syscall >= 271 && syscall <= 277)
2734+ ret = syscall + 6;
2735+ /* ioprio_set .. epoll_pwait */
2736+ else if (syscall >= 282 && syscall <= 312)
2737+ ret = syscall + 7;
2738+ else
2739+ ret = gdb_sys_no_syscall;
2740+
2741+ return (enum gdb_syscall) ret;
2742+ }
27362743 }
27372744 }
27382745