Corrected spelling error in comment: swaped -> swapped.
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
index 9aaf91a1446ba054f7e3198377472fcc86103890..1bdf278d4f7ecfe54ff56ba05273ff33d156c06d 100644 (file)
 
 /* This file was created with the aid of ``gdbarch.sh''.
 
-   The bourn shell script ``gdbarch.sh'' creates the files
+   The Bourne shell script ``gdbarch.sh'' creates the files
    ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
    against the existing ``gdbarch.[hc]''.  Any differences found
    being reported.
 
    If editing this file, please also run gdbarch.sh and merge any
-   changes into that script. Conversely, when makeing sweeping changes
+   changes into that script. Conversely, when making sweeping changes
    to this file, modifying gdbarch.sh and using its output may prove
    easier. */
 
@@ -128,8 +128,6 @@ struct gdbarch
 
      */
 
-  int bfd_vma_bit;
-  int ptr_bit;
   int short_bit;
   int int_bit;
   int long_bit;
@@ -137,6 +135,9 @@ struct gdbarch
   int float_bit;
   int double_bit;
   int long_double_bit;
+  int ptr_bit;
+  int addr_bit;
+  int bfd_vma_bit;
   int ieee_float;
   gdbarch_read_pc_ftype *read_pc;
   gdbarch_write_pc_ftype *write_pc;
@@ -162,6 +163,7 @@ struct gdbarch
   int max_register_virtual_size;
   gdbarch_register_virtual_type_ftype *register_virtual_type;
   gdbarch_do_registers_info_ftype *do_registers_info;
+  gdbarch_register_sim_regno_ftype *register_sim_regno;
   int use_generic_dummy_frames;
   int call_dummy_location;
   gdbarch_call_dummy_address_ftype *call_dummy_address;
@@ -224,6 +226,7 @@ struct gdbarch
   gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
   gdbarch_frame_num_args_ftype *frame_num_args;
   gdbarch_stack_align_ftype *stack_align;
+  int extra_stack_alignment_needed;
   gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
   gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
   const struct floatformat * float_format;
@@ -247,8 +250,6 @@ struct gdbarch startup_gdbarch =
   /*per-architecture data-pointers and swap regions */
   0, NULL, NULL,
   /* Multi-arch values */
-  8 * sizeof (void*),
-  8 * sizeof (void*),
   8 * sizeof (short),
   8 * sizeof (int),
   8 * sizeof (long),
@@ -256,6 +257,10 @@ struct gdbarch startup_gdbarch =
   8 * sizeof (float),
   8 * sizeof (double),
   8 * sizeof (long double),
+  8 * sizeof (void*),
+  8 * sizeof (void*),
+  8 * sizeof (void*),
+  0,
   0,
   0,
   0,
@@ -348,13 +353,14 @@ struct gdbarch startup_gdbarch =
   0,
   0,
   0,
+  0,
   /* startup_gdbarch() */
 };
 
 struct gdbarch *current_gdbarch = &startup_gdbarch;
 
 
-/* Create a new ``struct gdbarch'' based in information provided by
+/* Create a new ``struct gdbarch'' based on information provided by
    ``struct gdbarch_info''. */
 
 struct gdbarch *
@@ -370,7 +376,21 @@ gdbarch_alloc (const struct gdbarch_info *info,
   gdbarch->byte_order = info->byte_order;
 
   /* Force the explicit initialization of these. */
+  gdbarch->short_bit = 2*TARGET_CHAR_BIT;
+  gdbarch->int_bit = 4*TARGET_CHAR_BIT;
+  gdbarch->long_bit = 4*TARGET_CHAR_BIT;
+  gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
+  gdbarch->float_bit = 4*TARGET_CHAR_BIT;
+  gdbarch->double_bit = 8*TARGET_CHAR_BIT;
+  gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT;
+  gdbarch->ptr_bit = TARGET_INT_BIT;
   gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
+  gdbarch->read_pc = generic_target_read_pc;
+  gdbarch->write_pc = generic_target_write_pc;
+  gdbarch->read_fp = generic_target_read_fp;
+  gdbarch->write_fp = generic_target_write_fp;
+  gdbarch->read_sp = generic_target_read_sp;
+  gdbarch->write_sp = generic_target_write_sp;
   gdbarch->num_regs = -1;
   gdbarch->sp_regnum = -1;
   gdbarch->fp_regnum = -1;
@@ -384,6 +404,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   gdbarch->max_register_raw_size = -1;
   gdbarch->max_register_virtual_size = -1;
   gdbarch->do_registers_info = do_registers_info;
+  gdbarch->register_sim_regno = default_register_sim_regno;
   gdbarch->use_generic_dummy_frames = -1;
   gdbarch->call_dummy_start_offset = -1;
   gdbarch->call_dummy_breakpoint_offset = -1;
@@ -407,6 +428,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
   gdbarch->frame_args_skip = -1;
   gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
+  gdbarch->extra_stack_alignment_needed = 1;
   /* gdbarch_alloc() */
 
   return gdbarch;
@@ -441,50 +463,24 @@ verify_gdbarch (struct gdbarch *gdbarch)
   if (gdbarch->bfd_arch_info == NULL)
     internal_error ("verify_gdbarch: bfd_arch_info unset");
   /* Check those that need to be defined for the given multi-arch level. */
+  /* Skip verify of short_bit, invalid_p == 0 */
+  /* Skip verify of int_bit, invalid_p == 0 */
+  /* Skip verify of long_bit, invalid_p == 0 */
+  /* Skip verify of long_long_bit, invalid_p == 0 */
+  /* Skip verify of float_bit, invalid_p == 0 */
+  /* Skip verify of double_bit, invalid_p == 0 */
+  /* Skip verify of long_double_bit, invalid_p == 0 */
+  /* Skip verify of ptr_bit, invalid_p == 0 */
+  if (gdbarch->addr_bit == 0)
+    gdbarch->addr_bit = TARGET_PTR_BIT;
   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->ptr_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->short_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->int_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->long_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->long_long_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->float_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->double_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->long_double_bit == 0))
-    internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
   /* Skip verify of ieee_float, invalid_p == 0 */
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->read_pc == 0))
-    internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->write_pc == 0))
-    internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->read_fp == 0))
-    internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->write_fp == 0))
-    internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->read_sp == 0))
-    internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
-  if ((GDB_MULTI_ARCH >= 1)
-      && (gdbarch->write_sp == 0))
-    internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
+  /* Skip verify of read_pc, invalid_p == 0 */
+  /* Skip verify of write_pc, invalid_p == 0 */
+  /* Skip verify of read_fp, invalid_p == 0 */
+  /* Skip verify of write_fp, invalid_p == 0 */
+  /* Skip verify of read_sp, invalid_p == 0 */
+  /* Skip verify of write_sp, invalid_p == 0 */
   if ((GDB_MULTI_ARCH >= 2)
       && (gdbarch->num_regs == -1))
     internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
@@ -527,6 +523,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
       && (gdbarch->register_virtual_type == 0))
     internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
   /* Skip verify of do_registers_info, invalid_p == 0 */
+  /* Skip verify of register_sim_regno, invalid_p == 0 */
   if ((GDB_MULTI_ARCH >= 1)
       && (gdbarch->use_generic_dummy_frames == -1))
     internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
@@ -659,6 +656,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
       && (gdbarch->frame_num_args == 0))
     internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
   /* Skip verify of stack_align, has predicate */
+  /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
   /* Skip verify of reg_struct_has_addr, has predicate */
   /* Skip verify of save_dummy_frame_tos, has predicate */
   if (gdbarch->float_format == 0)
@@ -694,16 +692,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
                       XSTRING (TARGET_BYTE_ORDER));
 #endif
-#ifdef TARGET_BFD_VMA_BIT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
-                      XSTRING (TARGET_BFD_VMA_BIT));
-#endif
-#ifdef TARGET_PTR_BIT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_PTR_BIT # %s\n",
-                      XSTRING (TARGET_PTR_BIT));
-#endif
 #ifdef TARGET_SHORT_BIT
   fprintf_unfiltered (file,
                       "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
@@ -739,6 +727,21 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
                       XSTRING (TARGET_LONG_DOUBLE_BIT));
 #endif
+#ifdef TARGET_PTR_BIT
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: TARGET_PTR_BIT # %s\n",
+                      XSTRING (TARGET_PTR_BIT));
+#endif
+#ifdef TARGET_ADDR_BIT
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
+                      XSTRING (TARGET_ADDR_BIT));
+#endif
+#ifdef TARGET_BFD_VMA_BIT
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
+                      XSTRING (TARGET_BFD_VMA_BIT));
+#endif
 #ifdef IEEE_FLOAT
   fprintf_unfiltered (file,
                       "gdbarch_dump: IEEE_FLOAT # %s\n",
@@ -880,6 +883,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "DO_REGISTERS_INFO(reg_nr, fpregs)",
                       XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
 #endif
+#ifdef REGISTER_SIM_REGNO
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "REGISTER_SIM_REGNO(reg_nr)",
+                      XSTRING (REGISTER_SIM_REGNO (reg_nr)));
+#endif
 #ifdef USE_GENERIC_DUMMY_FRAMES
   fprintf_unfiltered (file,
                       "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
@@ -1251,6 +1260,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "STACK_ALIGN(sp)",
                       XSTRING (STACK_ALIGN (sp)));
 #endif
+#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
+                      XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
+#endif
 #ifdef REG_STRUCT_HAS_ADDR
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1290,16 +1304,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
                       (long) TARGET_BYTE_ORDER);
 #endif
-#ifdef TARGET_BFD_VMA_BIT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
-                      (long) TARGET_BFD_VMA_BIT);
-#endif
-#ifdef TARGET_PTR_BIT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
-                      (long) TARGET_PTR_BIT);
-#endif
 #ifdef TARGET_SHORT_BIT
   fprintf_unfiltered (file,
                       "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
@@ -1335,6 +1339,21 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
                       (long) TARGET_LONG_DOUBLE_BIT);
 #endif
+#ifdef TARGET_PTR_BIT
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
+                      (long) TARGET_PTR_BIT);
+#endif
+#ifdef TARGET_ADDR_BIT
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
+                      (long) TARGET_ADDR_BIT);
+#endif
+#ifdef TARGET_BFD_VMA_BIT
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
+                      (long) TARGET_BFD_VMA_BIT);
+#endif
 #ifdef IEEE_FLOAT
   fprintf_unfiltered (file,
                       "gdbarch_dump: IEEE_FLOAT = %ld\n",
@@ -1484,6 +1503,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->do_registers_info
                         /*DO_REGISTERS_INFO ()*/);
 #endif
+#ifdef REGISTER_SIM_REGNO
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
+                        (long) current_gdbarch->register_sim_regno
+                        /*REGISTER_SIM_REGNO ()*/);
+#endif
 #ifdef USE_GENERIC_DUMMY_FRAMES
   fprintf_unfiltered (file,
                       "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
@@ -1507,9 +1533,10 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       (long) CALL_DUMMY_START_OFFSET);
 #endif
 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
-                      (long) CALL_DUMMY_BREAKPOINT_OFFSET);
+  if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
+                        (long) CALL_DUMMY_BREAKPOINT_OFFSET);
 #endif
 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
   fprintf_unfiltered (file,
@@ -1888,6 +1915,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->stack_align
                         /*STACK_ALIGN ()*/);
 #endif
+#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
+                      (long) EXTRA_STACK_ALIGNMENT_NEEDED);
+#endif
 #ifdef REG_STRUCT_HAS_ADDR
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
@@ -1946,44 +1978,10 @@ gdbarch_byte_order (struct gdbarch *gdbarch)
   return gdbarch->byte_order;
 }
 
-int
-gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
-{
-  /* Skip verify of bfd_vma_bit, invalid_p == 0 */
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
-  return gdbarch->bfd_vma_bit;
-}
-
-void
-set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
-                         int bfd_vma_bit)
-{
-  gdbarch->bfd_vma_bit = bfd_vma_bit;
-}
-
-int
-gdbarch_ptr_bit (struct gdbarch *gdbarch)
-{
-  if (gdbarch->ptr_bit == 0)
-    internal_error ("gdbarch: gdbarch_ptr_bit invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
-  return gdbarch->ptr_bit;
-}
-
-void
-set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
-                     int ptr_bit)
-{
-  gdbarch->ptr_bit = ptr_bit;
-}
-
 int
 gdbarch_short_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->short_bit == 0)
-    internal_error ("gdbarch: gdbarch_short_bit invalid");
+  /* Skip verify of short_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
   return gdbarch->short_bit;
@@ -1999,8 +1997,7 @@ set_gdbarch_short_bit (struct gdbarch *gdbarch,
 int
 gdbarch_int_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->int_bit == 0)
-    internal_error ("gdbarch: gdbarch_int_bit invalid");
+  /* Skip verify of int_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
   return gdbarch->int_bit;
@@ -2016,8 +2013,7 @@ set_gdbarch_int_bit (struct gdbarch *gdbarch,
 int
 gdbarch_long_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->long_bit == 0)
-    internal_error ("gdbarch: gdbarch_long_bit invalid");
+  /* Skip verify of long_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
   return gdbarch->long_bit;
@@ -2033,8 +2029,7 @@ set_gdbarch_long_bit (struct gdbarch *gdbarch,
 int
 gdbarch_long_long_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->long_long_bit == 0)
-    internal_error ("gdbarch: gdbarch_long_long_bit invalid");
+  /* Skip verify of long_long_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
   return gdbarch->long_long_bit;
@@ -2050,8 +2045,7 @@ set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
 int
 gdbarch_float_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->float_bit == 0)
-    internal_error ("gdbarch: gdbarch_float_bit invalid");
+  /* Skip verify of float_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
   return gdbarch->float_bit;
@@ -2067,8 +2061,7 @@ set_gdbarch_float_bit (struct gdbarch *gdbarch,
 int
 gdbarch_double_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->double_bit == 0)
-    internal_error ("gdbarch: gdbarch_double_bit invalid");
+  /* Skip verify of double_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
   return gdbarch->double_bit;
@@ -2084,8 +2077,7 @@ set_gdbarch_double_bit (struct gdbarch *gdbarch,
 int
 gdbarch_long_double_bit (struct gdbarch *gdbarch)
 {
-  if (gdbarch->long_double_bit == 0)
-    internal_error ("gdbarch: gdbarch_long_double_bit invalid");
+  /* Skip verify of long_double_bit, invalid_p == 0 */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
   return gdbarch->long_double_bit;
@@ -2098,6 +2090,55 @@ set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
   gdbarch->long_double_bit = long_double_bit;
 }
 
+int
+gdbarch_ptr_bit (struct gdbarch *gdbarch)
+{
+  /* Skip verify of ptr_bit, invalid_p == 0 */
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
+  return gdbarch->ptr_bit;
+}
+
+void
+set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
+                     int ptr_bit)
+{
+  gdbarch->ptr_bit = ptr_bit;
+}
+
+int
+gdbarch_addr_bit (struct gdbarch *gdbarch)
+{
+  if (gdbarch->addr_bit == 0)
+    internal_error ("gdbarch: gdbarch_addr_bit invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
+  return gdbarch->addr_bit;
+}
+
+void
+set_gdbarch_addr_bit (struct gdbarch *gdbarch,
+                      int addr_bit)
+{
+  gdbarch->addr_bit = addr_bit;
+}
+
+int
+gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
+{
+  /* Skip verify of bfd_vma_bit, invalid_p == 0 */
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
+  return gdbarch->bfd_vma_bit;
+}
+
+void
+set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
+                         int bfd_vma_bit)
+{
+  gdbarch->bfd_vma_bit = bfd_vma_bit;
+}
+
 int
 gdbarch_ieee_float (struct gdbarch *gdbarch)
 {
@@ -2518,6 +2559,23 @@ set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
   gdbarch->do_registers_info = do_registers_info;
 }
 
+int
+gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
+{
+  if (gdbarch->register_sim_regno == 0)
+    internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
+  return gdbarch->register_sim_regno (reg_nr);
+}
+
+void
+set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
+                                gdbarch_register_sim_regno_ftype register_sim_regno)
+{
+  gdbarch->register_sim_regno = register_sim_regno;
+}
+
 int
 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
 {
@@ -3572,6 +3630,22 @@ set_gdbarch_stack_align (struct gdbarch *gdbarch,
   gdbarch->stack_align = stack_align;
 }
 
+int
+gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
+{
+  /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
+  return gdbarch->extra_stack_alignment_needed;
+}
+
+void
+set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
+                                          int extra_stack_alignment_needed)
+{
+  gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
+}
+
 int
 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
 {
@@ -3728,8 +3802,7 @@ init_gdbarch_data (struct gdbarch *gdbarch)
    data-pointer. */
 
 void *
-gdbarch_data (data)
-     struct gdbarch_data *data;
+gdbarch_data (struct gdbarch_data *data)
 {
   if (data->index >= current_gdbarch->nr_data)
     internal_error ("gdbarch_data: request for non-existant data.");
@@ -3738,7 +3811,7 @@ gdbarch_data (data)
 
 
 
-/* Keep a registrary of swaped data required by GDB modules. */
+/* Keep a registrary of swapped data required by GDB modules. */
 
 struct gdbarch_swap
 {
@@ -3957,7 +4030,7 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
    failed. */
 
 int
-gdbarch_update (struct gdbarch_info info)
+gdbarch_update_p (struct gdbarch_info info)
 {
   struct gdbarch *new_gdbarch;
   struct gdbarch_list **list;
@@ -4121,7 +4194,7 @@ disassemble_info tm_print_insn_info;
 extern void _initialize_gdbarch (void);
 
 void
-_initialize_gdbarch ()
+_initialize_gdbarch (void)
 {
   struct cmd_list_element *c;
 
This page took 0.029532 seconds and 4 git commands to generate.