PR 1150
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
index fdf7bb29639edd753d58f2896799eec90aa3d24e..4fa5ea4a3ec58e11140ea8d5b52496bab46c0d19 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
    Software Foundation, Inc.
 
    This file is part of GDB.
@@ -19,8 +19,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* This file was created with the aid of ``gdbarch.sh''.
 
@@ -61,6 +61,12 @@ static void alloc_gdbarch_data (struct gdbarch *);
 #define GDBARCH_DEBUG 0
 #endif
 int gdbarch_debug = GDBARCH_DEBUG;
+static void
+show_gdbarch_debug (struct ui_file *file, int from_tty,
+                    struct cmd_list_element *c, const char *value)
+{
+  fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
+}
 
 static const char *
 pformat (const struct floatformat *format)
@@ -161,7 +167,6 @@ struct gdbarch
   gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
   int deprecated_fp_regnum;
   gdbarch_push_dummy_call_ftype *push_dummy_call;
-  gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
   int deprecated_register_size;
   int call_dummy_location;
   gdbarch_push_dummy_code_ftype *push_dummy_code;
@@ -197,6 +202,7 @@ struct gdbarch
   CORE_ADDR decr_pc_after_break;
   CORE_ADDR deprecated_function_start_offset;
   gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
+  gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
   CORE_ADDR frame_args_skip;
   gdbarch_unwind_pc_ftype *unwind_pc;
   gdbarch_unwind_sp_ftype *unwind_sp;
@@ -211,10 +217,10 @@ struct gdbarch
   gdbarch_addr_bits_remove_ftype *addr_bits_remove;
   gdbarch_smash_text_address_ftype *smash_text_address;
   gdbarch_software_single_step_ftype *software_single_step;
+  gdbarch_single_step_through_delay_ftype *single_step_through_delay;
   gdbarch_print_insn_ftype *print_insn;
   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
   gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
-  gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
   gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
   gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
@@ -287,7 +293,6 @@ struct gdbarch startup_gdbarch =
   0,  /* unwind_dummy_id */
   -1,  /* deprecated_fp_regnum */
   0,  /* push_dummy_call */
-  0,  /* deprecated_push_arguments */
   0,  /* deprecated_register_size */
   0,  /* call_dummy_location */
   0,  /* push_dummy_code */
@@ -323,6 +328,7 @@ struct gdbarch startup_gdbarch =
   0,  /* decr_pc_after_break */
   0,  /* deprecated_function_start_offset */
   generic_remote_translate_xfer_address,  /* remote_translate_xfer_address */
+  0,  /* fetch_tls_load_module_address */
   0,  /* frame_args_skip */
   0,  /* unwind_pc */
   0,  /* unwind_sp */
@@ -337,10 +343,10 @@ struct gdbarch startup_gdbarch =
   0,  /* addr_bits_remove */
   0,  /* smash_text_address */
   0,  /* software_single_step */
+  0,  /* single_step_through_delay */
   0,  /* print_insn */
   0,  /* skip_trampoline_code */
   generic_skip_solib_resolver,  /* skip_solib_resolver */
-  0,  /* in_solib_call_trampoline */
   0,  /* in_solib_return_trampoline */
   generic_in_function_epilogue_p,  /* in_function_epilogue_p */
   construct_inferior_arguments,  /* construct_inferior_arguments */
@@ -437,7 +443,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->smash_text_address = core_addr_identity;
   current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
   current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
-  current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
   current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
   current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
   current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
@@ -545,7 +550,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
   /* Skip verify of unwind_dummy_id, has predicate */
   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
   /* Skip verify of push_dummy_call, has predicate */
-  /* Skip verify of deprecated_push_arguments, has predicate */
   /* Skip verify of call_dummy_location, invalid_p == 0 */
   /* Skip verify of push_dummy_code, has predicate */
   /* Skip verify of print_registers_info, invalid_p == 0 */
@@ -578,6 +582,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
   /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
+  /* Skip verify of fetch_tls_load_module_address, has predicate */
   /* Skip verify of frame_args_skip, invalid_p == 0 */
   /* Skip verify of unwind_pc, has predicate */
   /* Skip verify of unwind_sp, has predicate */
@@ -591,11 +596,11 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
   /* Skip verify of addr_bits_remove, invalid_p == 0 */
   /* Skip verify of smash_text_address, invalid_p == 0 */
   /* Skip verify of software_single_step, has predicate */
+  /* Skip verify of single_step_through_delay, has predicate */
   if (current_gdbarch->print_insn == 0)
     fprintf_unfiltered (log, "\n\tprint_insn");
   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
-  /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
   /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
@@ -614,7 +619,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
   make_cleanup (xfree, buf);
   if (strlen (buf) > 0)
     internal_error (__FILE__, __LINE__,
-                    "verify_gdbarch: the following are invalid ...%s",
+                    _("verify_gdbarch: the following are invalid ...%s"),
                     buf);
   do_cleanups (cleanups);
 }
@@ -631,9 +636,27 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
 void
 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
 {
+  const char *gdb_xm_file = "<not-defined>";
+  const char *gdb_nm_file = "<not-defined>";
+  const char *gdb_tm_file = "<not-defined>";
+#if defined (GDB_XM_FILE)
+  gdb_xm_file = GDB_XM_FILE;
+#endif
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: GDB_XM_FILE = %s\n",
+                      gdb_xm_file);
+#if defined (GDB_NM_FILE)
+  gdb_nm_file = GDB_NM_FILE;
+#endif
   fprintf_unfiltered (file,
-                      "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
-                      GDB_MULTI_ARCH);
+                      "gdbarch_dump: GDB_NM_FILE = %s\n",
+                      gdb_nm_file);
+#if defined (GDB_TM_FILE)
+  gdb_tm_file = GDB_TM_FILE;
+#endif
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: GDB_TM_FILE = %s\n",
+                      gdb_tm_file);
 #ifdef TARGET_ADDR_BIT
   fprintf_unfiltered (file,
                       "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
@@ -854,24 +877,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
                       paddr_nz (current_gdbarch->deprecated_function_start_offset));
-#ifdef DEPRECATED_PUSH_ARGUMENTS_P
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_PUSH_ARGUMENTS_P()",
-                      XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: gdbarch_deprecated_push_arguments_p() = %d\n",
-                      gdbarch_deprecated_push_arguments_p (current_gdbarch));
-#ifdef DEPRECATED_PUSH_ARGUMENTS
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
-                      XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: deprecated_push_arguments = <0x%lx>\n",
-                      (long) current_gdbarch->deprecated_push_arguments);
 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1067,6 +1072,24 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
                       (long) current_gdbarch->fetch_pointer_argument);
+#ifdef FETCH_TLS_LOAD_MODULE_ADDRESS_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "FETCH_TLS_LOAD_MODULE_ADDRESS_P()",
+                      XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS_P ()));
+#endif
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
+                      gdbarch_fetch_tls_load_module_address_p (current_gdbarch));
+#ifdef FETCH_TLS_LOAD_MODULE_ADDRESS
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "FETCH_TLS_LOAD_MODULE_ADDRESS(objfile)",
+                      XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS (objfile)));
+#endif
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
+                      (long) current_gdbarch->fetch_tls_load_module_address);
 #ifdef TARGET_FLOAT_BIT
   fprintf_unfiltered (file,
                       "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
@@ -1160,15 +1183,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
                       (long) current_gdbarch->in_function_epilogue_p);
-#ifdef IN_SOLIB_CALL_TRAMPOLINE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
-                      XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: in_solib_call_trampoline = <0x%lx>\n",
-                      (long) current_gdbarch->in_solib_call_trampoline);
 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1195,21 +1209,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: int_bit = %s\n",
                       paddr_d (current_gdbarch->int_bit));
-#ifdef INTEGER_TO_ADDRESS_P
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "INTEGER_TO_ADDRESS_P()",
-                      XSTRING (INTEGER_TO_ADDRESS_P ()));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
                       gdbarch_integer_to_address_p (current_gdbarch));
-#ifdef INTEGER_TO_ADDRESS
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "INTEGER_TO_ADDRESS(type, buf)",
-                      XSTRING (INTEGER_TO_ADDRESS (type, buf)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: integer_to_address = <0x%lx>\n",
                       (long) current_gdbarch->integer_to_address);
@@ -1498,6 +1500,12 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: short_bit = %s\n",
                       paddr_d (current_gdbarch->short_bit));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
+                      gdbarch_single_step_through_delay_p (current_gdbarch));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
+                      (long) current_gdbarch->single_step_through_delay);
 #ifdef SKIP_PROLOGUE
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1987,7 +1995,7 @@ gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
 }
 
 void
-gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
+gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->pseudo_register_read != NULL);
@@ -2011,7 +2019,7 @@ gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
 }
 
 void
-gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
+gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->pseudo_register_write != NULL);
@@ -2346,30 +2354,6 @@ set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
   gdbarch->push_dummy_call = push_dummy_call;
 }
 
-int
-gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_push_arguments != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
-{
-  gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->deprecated_push_arguments != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
-  return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
-}
-
-void
-set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
-                                       gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
-{
-  gdbarch->deprecated_push_arguments = deprecated_push_arguments;
-}
-
 int
 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
 {
@@ -2625,7 +2609,7 @@ set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
+gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->register_to_value != NULL);
@@ -2642,7 +2626,7 @@ set_gdbarch_register_to_value (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
+gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->value_to_register != NULL);
@@ -2659,7 +2643,7 @@ set_gdbarch_value_to_register (struct gdbarch *gdbarch,
 }
 
 CORE_ADDR
-gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
+gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->pointer_to_address != NULL);
@@ -2676,7 +2660,7 @@ set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
+gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->address_to_pointer != NULL);
@@ -2700,13 +2684,13 @@ gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
 }
 
 CORE_ADDR
-gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
+gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->integer_to_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
-  return gdbarch->integer_to_address (type, buf);
+  return gdbarch->integer_to_address (gdbarch, type, buf);
 }
 
 void
@@ -2748,7 +2732,7 @@ gdbarch_return_value_p (struct gdbarch *gdbarch)
 }
 
 enum return_value_convention
-gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
+gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->return_value != NULL);
@@ -2766,7 +2750,7 @@ set_gdbarch_return_value (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
+gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->extract_return_value != NULL);
@@ -2783,7 +2767,7 @@ set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
+gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->store_return_value != NULL);
@@ -2800,7 +2784,7 @@ set_gdbarch_store_return_value (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
+gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
@@ -2817,7 +2801,7 @@ set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
+gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->deprecated_store_return_value != NULL);
@@ -2908,7 +2892,7 @@ set_gdbarch_inner_than (struct gdbarch *gdbarch,
   gdbarch->inner_than = inner_than;
 }
 
-const unsigned char *
+const gdb_byte *
 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 {
   gdb_assert (gdbarch != NULL);
@@ -2950,7 +2934,7 @@ set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
+gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *contents_cache)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
@@ -2967,7 +2951,7 @@ set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
+gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *contents_cache)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
@@ -3034,6 +3018,30 @@ set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
   gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
 }
 
+int
+gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->fetch_tls_load_module_address != NULL;
+}
+
+CORE_ADDR
+gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
+  return gdbarch->fetch_tls_load_module_address (objfile);
+}
+
+void
+set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
+                                           gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
+{
+  gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
+}
+
 CORE_ADDR
 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
 {
@@ -3327,6 +3335,30 @@ set_gdbarch_software_single_step (struct gdbarch *gdbarch,
   gdbarch->software_single_step = software_single_step;
 }
 
+int
+gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->single_step_through_delay != NULL;
+}
+
+int
+gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->single_step_through_delay != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
+  return gdbarch->single_step_through_delay (gdbarch, frame);
+}
+
+void
+set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
+                                       gdbarch_single_step_through_delay_ftype single_step_through_delay)
+{
+  gdbarch->single_step_through_delay = single_step_through_delay;
+}
+
 int
 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
 {
@@ -3378,23 +3410,6 @@ set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
   gdbarch->skip_solib_resolver = skip_solib_resolver;
 }
 
-int
-gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
-{
-  gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
-  return gdbarch->in_solib_call_trampoline (pc, name);
-}
-
-void
-set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
-                                      gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
-{
-  gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
-}
-
 int
 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
 {
@@ -3931,7 +3946,7 @@ gdbarch_printable_names (void)
       ap = bfd_lookup_arch (rego->bfd_architecture, 0);
       if (ap == NULL)
         internal_error (__FILE__, __LINE__,
-                        "gdbarch_architecture_names: multi-arch unknown");
+                        _("gdbarch_architecture_names: multi-arch unknown"));
       do
         {
           append_name (&arches, &nr_arches, ap->printable_name);
@@ -3956,7 +3971,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
   if (bfd_arch_info == NULL)
     {
       internal_error (__FILE__, __LINE__,
-                      "gdbarch: Attempt to register unknown architecture (%d)",
+                      _("gdbarch: Attempt to register unknown architecture (%d)"),
                       bfd_architecture);
     }
   /* Check that we haven't seen this architecture before */
@@ -3966,7 +3981,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
     {
       if (bfd_architecture == (*curr)->bfd_architecture)
        internal_error (__FILE__, __LINE__,
-                        "gdbarch: Duplicate registraration of architecture (%s)",
+                        _("gdbarch: Duplicate registraration of architecture (%s)"),
                        bfd_arch_info->printable_name);
     }
   /* log it */
@@ -4181,6 +4196,7 @@ deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
   current_gdbarch_swap_out_hack ();
   current_gdbarch_swap_in_hack (new_gdbarch);
   architecture_changed_event ();
+  flush_cached_frames ();
 }
 
 extern void _initialize_gdbarch (void);
@@ -4190,21 +4206,11 @@ _initialize_gdbarch (void)
 {
   struct cmd_list_element *c;
 
-  deprecated_add_show_from_set
-    (add_set_cmd ("arch",
-                 class_maintenance,
-                 var_zinteger,
-                 (char *)&gdbarch_debug,
-                 "Set architecture debugging.\n\
-When non-zero, architecture debugging is enabled.", &setdebuglist),
-     &showdebuglist);
-  c = add_set_cmd ("archdebug",
-                  class_maintenance,
-                  var_zinteger,
-                  (char *)&gdbarch_debug,
-                  "Set architecture debugging.\n\
-When non-zero, architecture debugging is enabled.", &setlist);
-
-  deprecate_cmd (c, "set debug arch");
-  deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");
+  add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
+Set architecture debugging."), _("\
+Show architecture debugging."), _("\
+When non-zero, architecture debugging is enabled."),
+                            NULL,
+                            show_gdbarch_debug,
+                            &setdebuglist, &showdebuglist);
 }
This page took 0.054848 seconds and 4 git commands to generate.