diff options
author | Pedro Alves <palves@redhat.com> | 2015-10-29 12:55:02 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-10-29 12:55:02 +0000 |
commit | 50bc912a2074c974c9c5074e674e9149a33b64c2 (patch) | |
tree | 31bbb67462bc5818b6c55dac52eae3dbc79ec8c8 /gdb/gdbserver | |
parent | 44a8b4df1d6f5b8096f01787751fd51c42e78fc6 (diff) | |
download | gdb-50bc912a2074c974c9c5074e674e9149a33b64c2.zip gdb-50bc912a2074c974c9c5074e674e9149a33b64c2.tar.gz gdb-50bc912a2074c974c9c5074e674e9149a33b64c2.tar.bz2 |
gdbserver/Linux: Introduce NULL_REGSET
Fixes errors like:
src/gdb/gdbserver/linux-x86-low.c:477:1: error: invalid conversion from 'int' to 'regset_type' [-fpermissive]
gdb/gdbserver/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>
* linux-low.h (NULL_REGSET): Define.
* linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
* linux-arm-low.c (arm_regsets): Likewise.
* linux-crisv32-low.c (cris_regsets): Likewise.
* linux-m68k-low.c (m68k_regsets): Likewise.
* linux-mips-low.c (mips_regsets): Likewise.
* linux-nios2-low.c (nios2_regsets): Likewise.
* linux-ppc-low.c (ppc_regsets): Likewise.
* linux-s390-low.c (s390_regsets): Likewise.
* linux-sh-low.c (sh_regsets): Likewise.
* linux-sparc-low.c (sparc_regsets): Likewise.
* linux-tic6x-low.c (tic6x_regsets): Likewise.
* linux-tile-low.c (tile_regsets): Likewise.
* linux-x86-low.c (x86_regsets): Likewise.
* linux-xtensa-low.c (xtensa_regsets): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 18 | ||||
-rw-r--r-- | gdb/gdbserver/linux-aarch64-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-arm-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-crisv32-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.h | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-m68k-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-mips-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-nios2-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-ppc-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-s390-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-sh-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-sparc-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-tic6x-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-tile-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-xtensa-low.c | 2 |
16 files changed, 37 insertions, 14 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 1b9e0c4..0dfecf1 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,21 @@ +2015-10-29 Pedro Alves <palves@redhat.com> + + * linux-low.h (NULL_REGSET): Define. + * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET. + * linux-arm-low.c (arm_regsets): Likewise. + * linux-crisv32-low.c (cris_regsets): Likewise. + * linux-m68k-low.c (m68k_regsets): Likewise. + * linux-mips-low.c (mips_regsets): Likewise. + * linux-nios2-low.c (nios2_regsets): Likewise. + * linux-ppc-low.c (ppc_regsets): Likewise. + * linux-s390-low.c (s390_regsets): Likewise. + * linux-sh-low.c (sh_regsets): Likewise. + * linux-sparc-low.c (sparc_regsets): Likewise. + * linux-tic6x-low.c (tic6x_regsets): Likewise. + * linux-tile-low.c (tile_regsets): Likewise. + * linux-x86-low.c (x86_regsets): Likewise. + * linux-xtensa-low.c (xtensa_regsets): Likewise. + 2015-10-26 Doug Evans <dje@google.com> * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h. diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index cb49a04..4f23392 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -539,7 +539,7 @@ static struct regset_info aarch64_regsets[] = sizeof (struct user_fpsimd_state), FP_REGS, aarch64_fill_fpregset, aarch64_store_fpregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info aarch64_regsets_info = diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index d3ae9f4..bab2aaf 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -898,7 +898,7 @@ static struct regset_info arm_regsets[] = { { PTRACE_GETVFPREGS, PTRACE_SETVFPREGS, 0, 32 * 8 + 4, EXTENDED_REGS, arm_fill_vfpregset, arm_store_vfpregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info arm_regsets_info = diff --git a/gdb/gdbserver/linux-crisv32-low.c b/gdb/gdbserver/linux-crisv32-low.c index f97122e..8d9ef04 100644 --- a/gdb/gdbserver/linux-crisv32-low.c +++ b/gdb/gdbserver/linux-crisv32-low.c @@ -391,7 +391,7 @@ cris_arch_setup (void) static struct regset_info cris_regsets[] = { { PTRACE_GETREGS, PTRACE_SETREGS, 0, cris_num_regs * 4, GENERAL_REGS, cris_fill_gregset, cris_store_gregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h index 28dd4db..ccf4c94 100644 --- a/gdb/gdbserver/linux-low.h +++ b/gdb/gdbserver/linux-low.h @@ -38,6 +38,11 @@ enum regset_type { EXTENDED_REGS, }; +/* The arch's regsets array initializer must be terminated with a NULL + regset. */ +#define NULL_REGSET \ + { 0, 0, 0, -1, (enum regset_type) -1, NULL, NULL } + struct regset_info { int get_request, set_request; diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c index ba8e5e9..10129a6 100644 --- a/gdb/gdbserver/linux-m68k-low.c +++ b/gdb/gdbserver/linux-m68k-low.c @@ -119,7 +119,7 @@ static struct regset_info m68k_regsets[] = { FP_REGS, m68k_fill_fpregset, m68k_store_fpregset }, #endif /* HAVE_PTRACE_GETREGS */ - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static const gdb_byte m68k_breakpoint[] = { 0x4E, 0x4F }; diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c index 344d7a5..86f7962 100644 --- a/gdb/gdbserver/linux-mips-low.c +++ b/gdb/gdbserver/linux-mips-low.c @@ -837,7 +837,7 @@ static struct regset_info mips_regsets[] = { { PTRACE_GETFPREGS, PTRACE_SETFPREGS, 0, 33 * 8, FP_REGS, mips_fill_fpregset, mips_store_fpregset }, #endif /* HAVE_PTRACE_GETREGS */ - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info mips_regsets_info = diff --git a/gdb/gdbserver/linux-nios2-low.c b/gdb/gdbserver/linux-nios2-low.c index 95a2d9e..369e89c 100644 --- a/gdb/gdbserver/linux-nios2-low.c +++ b/gdb/gdbserver/linux-nios2-low.c @@ -239,7 +239,7 @@ static struct regset_info nios2_regsets[] = { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS, nios2_num_regs * 4, GENERAL_REGS, nios2_fill_gregset, nios2_store_gregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info nios2_regsets_info = diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c index 6e6a936..9e223ea 100644 --- a/gdb/gdbserver/linux-ppc-low.c +++ b/gdb/gdbserver/linux-ppc-low.c @@ -657,7 +657,7 @@ static struct regset_info ppc_regsets[] = { { PTRACE_GETEVRREGS, PTRACE_SETEVRREGS, 0, 32 * 4 + 8 + 4, EXTENDED_REGS, ppc_fill_evrregset, ppc_store_evrregset }, { 0, 0, 0, 0, GENERAL_REGS, ppc_fill_gregset, NULL }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct usrregs_info ppc_usrregs_info = diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index 2ba1221..efede2d 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -390,7 +390,7 @@ static struct regset_info s390_regsets[] = { EXTENDED_REGS, s390_fill_vxrs_low, s390_store_vxrs_low }, { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_VXRS_HIGH, 0, EXTENDED_REGS, s390_fill_vxrs_high, s390_store_vxrs_high }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; diff --git a/gdb/gdbserver/linux-sh-low.c b/gdb/gdbserver/linux-sh-low.c index f7f3239..207e87e 100644 --- a/gdb/gdbserver/linux-sh-low.c +++ b/gdb/gdbserver/linux-sh-low.c @@ -114,7 +114,7 @@ static void sh_fill_gregset (struct regcache *regcache, void *buf) static struct regset_info sh_regsets[] = { { 0, 0, 0, 0, GENERAL_REGS, sh_fill_gregset, NULL }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info sh_regsets_info = diff --git a/gdb/gdbserver/linux-sparc-low.c b/gdb/gdbserver/linux-sparc-low.c index 0691867..e6a4f84 100644 --- a/gdb/gdbserver/linux-sparc-low.c +++ b/gdb/gdbserver/linux-sparc-low.c @@ -291,7 +291,7 @@ static struct regset_info sparc_regsets[] = { { PTRACE_GETFPREGS, PTRACE_SETFPREGS, 0, sizeof (fpregset_t), FP_REGS, sparc_fill_fpregset, sparc_store_fpregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info sparc_regsets_info = diff --git a/gdb/gdbserver/linux-tic6x-low.c b/gdb/gdbserver/linux-tic6x-low.c index d9476fd..cf8b5fb 100644 --- a/gdb/gdbserver/linux-tic6x-low.c +++ b/gdb/gdbserver/linux-tic6x-low.c @@ -332,7 +332,7 @@ tic6x_store_gregset (struct regcache *regcache, const void *buf) static struct regset_info tic6x_regsets[] = { { PTRACE_GETREGS, PTRACE_SETREGS, 0, TIC6X_NUM_REGS * 4, GENERAL_REGS, tic6x_fill_gregset, tic6x_store_gregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static void diff --git a/gdb/gdbserver/linux-tile-low.c b/gdb/gdbserver/linux-tile-low.c index e31a620..47ca245 100644 --- a/gdb/gdbserver/linux-tile-low.c +++ b/gdb/gdbserver/linux-tile-low.c @@ -135,7 +135,7 @@ static struct regset_info tile_regsets[] = { { PTRACE_GETREGS, PTRACE_SETREGS, 0, tile_num_regs * 8, GENERAL_REGS, tile_fill_gregset, tile_store_gregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static struct regsets_info tile_regsets_info = diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 406d552..89ec4e5 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -463,7 +463,7 @@ static struct regset_info x86_regsets[] = FP_REGS, x86_fill_fpregset, x86_store_fpregset }, #endif /* HAVE_PTRACE_GETREGS */ - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; static CORE_ADDR diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c index fa6f418..7c71631 100644 --- a/gdb/gdbserver/linux-xtensa-low.c +++ b/gdb/gdbserver/linux-xtensa-low.c @@ -142,7 +142,7 @@ static struct regset_info xtensa_regsets[] = { { PTRACE_GETXTREGS, PTRACE_SETXTREGS, 0, XTENSA_ELF_XTREG_SIZE, EXTENDED_REGS, xtensa_fill_xtregset, xtensa_store_xtregset }, - { 0, 0, 0, -1, -1, NULL, NULL } + NULL_REGSET }; #if XCHAL_HAVE_BE |