gdbserver/Linux: Introduce NULL_REGSET
authorPedro Alves <palves@redhat.com>
Thu, 29 Oct 2015 12:55:02 +0000 (12:55 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 29 Oct 2015 12:55:02 +0000 (12:55 +0000)
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.

16 files changed:
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-aarch64-low.c
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-crisv32-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/linux-m68k-low.c
gdb/gdbserver/linux-mips-low.c
gdb/gdbserver/linux-nios2-low.c
gdb/gdbserver/linux-ppc-low.c
gdb/gdbserver/linux-s390-low.c
gdb/gdbserver/linux-sh-low.c
gdb/gdbserver/linux-sparc-low.c
gdb/gdbserver/linux-tic6x-low.c
gdb/gdbserver/linux-tile-low.c
gdb/gdbserver/linux-x86-low.c
gdb/gdbserver/linux-xtensa-low.c

index 1b9e0c4ec50c48c35ebf297ebe98d1c78ef72cac..0dfecf1ddeead30b68eef734d9f74b284ae0129e 100644 (file)
@@ -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.
index cb49a044518c7fdf3b0a24eab7ff14298955b5ff..4f23392baf9c7217c64cd8d8b1cffa491e057179 100644 (file)
@@ -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 =
index d3ae9f40b490bc0b9836a54c8f686fe57403f2cf..bab2aafc751afd347f2d3908ef945236a63d9171 100644 (file)
@@ -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 =
index f97122e3dac58f3e9eee9ceae42387bafd477c06..8d9ef04c5762ce1a90dff1e144a8930e1f2685a6 100644 (file)
@@ -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
 };
 
 
index 28dd4db126353b9c1f2ec14fd37f602e1238e522..ccf4c9421d879a0ecdacdb145ee4bc6f2280ee00 100644 (file)
@@ -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;
index ba8e5e9d5a970df1247a0d12ef34b15434fcf5a4..10129a695982db8a0ed8b78d293352cbacf8181a 100644 (file)
@@ -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 };
index 344d7a5144a16fcdcf003c06e178feac3b08adc1..86f7962597ea329970aecb9f383b8458bf7ee3dd 100644 (file)
@@ -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 =
index 95a2d9ee9d13ee305d5181ae23fa16b37477a042..369e89c3121ba59967416e89ded3f2f6ae4876e6 100644 (file)
@@ -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 =
index 6e6a93644f1f23e8a8b4000dce074da6dc0eeb0c..9e223ea4f399e62018257597b8abb2aa240c30ac 100644 (file)
@@ -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 =
index 2ba12210c62748b5b74a9d73b16ef3cb84963025..efede2de74b056e25235d1c2f946ccf09f1883c1 100644 (file)
@@ -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
 };
 
 
index f7f3239a34b13b97bacb7f71a7a6842343739aaf..207e87e02818f50cecc12d6945cd480c15cd2dc8 100644 (file)
@@ -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 =
index 0691867a74e2002fde7c6c13af2693a1bd8ee60e..e6a4f844ef2f45918d3630a553182d336e910c7a 100644 (file)
@@ -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 =
index d9476fd4e45c7920a4a242ce2ab240d76a7f4512..cf8b5fb4615468cde7c93508d234036f7590d612 100644 (file)
@@ -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
index e31a620454377ec1e0f1d44dd7feb4cc2fe8d655..47ca245215ec42dc838a45181064cd34c1e3d9ca 100644 (file)
@@ -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 =
index 406d5524be9c6595cdbcf784099fdd0c84c0672c..89ec4e54b3b8f5caee9f93ad436ba4278e595445 100644 (file)
@@ -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
index fa6f418afc21ea86aa9e1e9ed2dee69b4a856e0c..7c71631ad9d41e8822421f0e1673ec5d189cf0c6 100644 (file)
@@ -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
This page took 0.036873 seconds and 4 git commands to generate.