* ld-selective/selective.exp <no CXX>: Fix typo for argument to
[deliverable/binutils-gdb.git] / gdb / arch-utils.c
index 8af1373ffeac61239998e0eddac7949ade5c00d6..4c87676d834e88631eb1997585e2a2b50c0cdbc2 100644 (file)
@@ -220,6 +220,19 @@ generic_register_convertible_not (int num)
 }
   
 
+int
+default_register_sim_regno (int num)
+{
+  return num;
+}
+
+
+CORE_ADDR
+default_convert_from_func_ptr_addr (CORE_ADDR addr)
+{
+  return addr;
+}
+
 /* Functions to manipulate the endianness of the target.  */
 
 #ifdef TARGET_BYTE_ORDER_SELECTABLE
@@ -292,7 +305,10 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
          struct gdbarch_info info;
          memset (&info, 0, sizeof info);
          info.byte_order = LITTLE_ENDIAN;
-         gdbarch_update (info);
+         if (! gdbarch_update_p (info))
+           {
+             printf_unfiltered ("Little endian target not supported by GDB\n");
+           }
        }
       else
        {
@@ -307,7 +323,10 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
          struct gdbarch_info info;
          memset (&info, 0, sizeof info);
          info.byte_order = BIG_ENDIAN;
-         gdbarch_update (info);
+         if (! gdbarch_update_p (info))
+           {
+             printf_unfiltered ("Big endian target not supported by GDB\n");
+           }
        }
       else
        {
@@ -422,7 +441,7 @@ set_architecture_from_arch_mach (enum bfd_architecture arch,
   if (wanted != NULL)
     set_arch (wanted, set_arch_manual);
   else
-    internal_error ("gdbarch: hardwired architecture/machine not reconized");
+    internal_error ("gdbarch: hardwired architecture/machine not recognized");
 }
 
 /* Set the architecture from a BFD (deprecated) */
@@ -478,10 +497,10 @@ set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
       info.bfd_arch_info = bfd_scan_arch (set_architecture_string);
       if (info.bfd_arch_info == NULL)
        internal_error ("set_architecture: bfd_scan_arch failed");
-      if (gdbarch_update (info))
+      if (gdbarch_update_p (info))
        target_architecture_auto = 0;
       else
-       printf_unfiltered ("Architecture `%s' not reconized.\n",
+       printf_unfiltered ("Architecture `%s' not recognized.\n",
                           set_architecture_string);
     }
   else
@@ -529,7 +548,7 @@ info_architecture (char *args, int from_tty)
   printf_filtered ("\n");
 }
 
-/* Set the dynamic target-system-dependant parameters (architecture,
+/* Set the dynamic target-system-dependent parameters (architecture,
    byte-order) using information found in the BFD */
 
 void
@@ -540,7 +559,8 @@ set_gdbarch_from_file (bfd *abfd)
       struct gdbarch_info info;
       memset (&info, 0, sizeof info);
       info.abfd = abfd;
-      gdbarch_update (info);
+      if (! gdbarch_update_p (info))
+       error ("Architecture of file not recognized.\n");
     }
   else
     {
@@ -635,7 +655,10 @@ initialize_current_architecture (void)
 
   if (GDB_MULTI_ARCH)
     {
-      gdbarch_update (info);
+      if (! gdbarch_update_p (info))
+       {
+         internal_error ("initialize_current_architecture: Selection of initial architecture failed");
+       }
     }
 
   /* Create the ``set architecture'' command appending ``auto'' to the
This page took 0.027478 seconds and 4 git commands to generate.