gdb: defer commit resume until all available events are consumed
[deliverable/binutils-gdb.git] / gdb / ppc-nbsd-tdep.c
index 2c03f97d65be1428599c7b8df3c61f7f1ee16af9..ba4e943a01a82a2c3c6dd847c6dd612227159b82 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for NetBSD/powerpc.
 
-   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+   Copyright (C) 2002-2020 Free Software Foundation, Inc.
 
    Contributed by Wasabi Systems, Inc.
 
@@ -28,7 +28,8 @@
 #include "tramp-frame.h"
 
 #include "ppc-tdep.h"
-#include "ppc-nbsd-tdep.h"
+#include "nbsd-tdep.h"
+#include "ppc-tdep.h"
 #include "solib-svr4.h"
 
 /* Register offsets from <machine/reg.h>.  */
@@ -59,8 +60,8 @@ ppcnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
                                      void *cb_data,
                                      const struct regcache *regcache)
 {
-  cb (".reg", 148, &ppcnbsd_gregset, NULL, cb_data);
-  cb (".reg2", 264, &ppcnbsd_fpregset, NULL, cb_data);
+  cb (".reg", 148, 148, &ppcnbsd_gregset, NULL, cb_data);
+  cb (".reg2", 264, 264, &ppcnbsd_fpregset, NULL, cb_data);
 }
 \f
 
@@ -74,8 +75,8 @@ ppcnbsd_return_value (struct gdbarch *gdbarch, struct value *function,
                      gdb_byte *readbuf, const gdb_byte *writebuf)
 {
 #if 0
-  if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
-       || TYPE_CODE (valtype) == TYPE_CODE_UNION)
+  if ((valtype->code () == TYPE_CODE_STRUCT
+       || valtype->code () == TYPE_CODE_UNION)
       && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
            && TYPE_VECTOR (valtype))
       && !(TYPE_LENGTH (valtype) == 1
@@ -137,14 +138,14 @@ static const struct tramp_frame ppcnbsd_sigtramp =
   SIGTRAMP_FRAME,
   4,
   {
-    { 0x3821fff0, -1 },                /* add r1,r1,-16 */
-    { 0x4e800021, -1 },                /* blrl */
-    { 0x38610018, -1 },                /* addi r3,r1,24 */
-    { 0x38000127, -1 },                /* li r0,295 */
-    { 0x44000002, -1 },                /* sc */
-    { 0x38000001, -1 },                /* li r0,1 */
-    { 0x44000002, -1 },                /* sc */
-    { TRAMP_SENTINEL_INSN, -1 }
+    { 0x3821fff0, ULONGEST_MAX },              /* add r1,r1,-16 */
+    { 0x4e800021, ULONGEST_MAX },              /* blrl */
+    { 0x38610018, ULONGEST_MAX },              /* addi r3,r1,24 */
+    { 0x38000127, ULONGEST_MAX },              /* li r0,295 */
+    { 0x44000002, ULONGEST_MAX },              /* sc */
+    { 0x38000001, ULONGEST_MAX },              /* li r0,1 */
+    { 0x44000002, ULONGEST_MAX },              /* sc */
+    { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
   },
   ppcnbsd_sigtramp_cache_init
 };
@@ -156,14 +157,14 @@ const struct tramp_frame ppcnbsd2_sigtramp =
   SIGTRAMP_FRAME,
   4,
   {
-    { 0x3821fff0, -1 },                /* add r1,r1,-16 */
-    { 0x4e800021, -1 },                /* blrl */
-    { 0x38610010, -1 },                /* addi r3,r1,16 */
-    { 0x38000127, -1 },                /* li r0,295 */
-    { 0x44000002, -1 },                /* sc */
-    { 0x38000001, -1 },                /* li r0,1 */
-    { 0x44000002, -1 },                /* sc */
-    { TRAMP_SENTINEL_INSN, -1 }
+    { 0x3821fff0, ULONGEST_MAX },              /* add r1,r1,-16 */
+    { 0x4e800021, ULONGEST_MAX },              /* blrl */
+    { 0x38610010, ULONGEST_MAX },              /* addi r3,r1,16 */
+    { 0x38000127, ULONGEST_MAX },              /* li r0,295 */
+    { 0x44000002, ULONGEST_MAX },              /* sc */
+    { 0x38000001, ULONGEST_MAX },              /* li r0,1 */
+    { 0x44000002, ULONGEST_MAX },              /* sc */
+    { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
   },
   ppcnbsd_sigtramp_cache_init
 };
@@ -173,6 +174,8 @@ static void
 ppcnbsd_init_abi (struct gdbarch_info info,
                   struct gdbarch *gdbarch)
 {
+  nbsd_init_abi (info, gdbarch);
+
   /* For NetBSD, this is an on again, off again thing.  Some systems
      do use the broken struct convention, and some don't.  */
   set_gdbarch_return_value (gdbarch, ppcnbsd_return_value);
@@ -187,13 +190,10 @@ ppcnbsd_init_abi (struct gdbarch_info info,
   tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd_sigtramp);
   tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd2_sigtramp);
 }
-\f
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_ppcnbsd_tdep (void);
 
+void _initialize_ppcnbsd_tdep ();
 void
-_initialize_ppcnbsd_tdep (void)
+_initialize_ppcnbsd_tdep ()
 {
   gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD,
                          ppcnbsd_init_abi);
@@ -219,9 +219,5 @@ _initialize_ppcnbsd_tdep (void)
       ppcnbsd_reg_offsets.fpscr_offset = 256;
       ppcnbsd_reg_offsets.fpscr_size = 4;
 
-      /* AltiVec registers.  */
-      ppcnbsd_reg_offsets.vr0_offset = 0;
-      ppcnbsd_reg_offsets.vrsave_offset = 512;
-      ppcnbsd_reg_offsets.vscr_offset = 524;
     }
 }
This page took 0.035353 seconds and 4 git commands to generate.