*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / arch-utils.c
index bd8abeae4f63cd6634def3be9a255dc97fa4e36a..1f85b38d29474a9c8c348f5adb36a53e7780287c 100644 (file)
@@ -119,16 +119,6 @@ generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
   return 0;
 }
 
-void
-generic_remote_translate_xfer_address (struct gdbarch *gdbarch,
-                                      struct regcache *regcache,
-                                      CORE_ADDR gdb_addr, int gdb_len,
-                                      CORE_ADDR * rem_addr, int *rem_len)
-{
-  *rem_addr = gdb_addr;
-  *rem_len = gdb_len;
-}
-
 /* Helper functions for INNER_THAN */
 
 int
@@ -143,42 +133,6 @@ core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs)
   return (lhs > rhs);
 }
 
-
-/* Helper functions for TARGET_{FLOAT,DOUBLE}_FORMAT */
-
-const struct floatformat *
-default_float_format (struct gdbarch *gdbarch)
-{
-  int byte_order = gdbarch_byte_order (gdbarch);
-  switch (byte_order)
-    {
-    case BFD_ENDIAN_BIG:
-      return &floatformat_ieee_single_big;
-    case BFD_ENDIAN_LITTLE:
-      return &floatformat_ieee_single_little;
-    default:
-      internal_error (__FILE__, __LINE__,
-                     _("default_float_format: bad byte order"));
-    }
-}
-
-
-const struct floatformat *
-default_double_format (struct gdbarch *gdbarch)
-{
-  int byte_order = gdbarch_byte_order (gdbarch);
-  switch (byte_order)
-    {
-    case BFD_ENDIAN_BIG:
-      return &floatformat_ieee_double_big;
-    case BFD_ENDIAN_LITTLE:
-      return &floatformat_ieee_double_little;
-    default:
-      internal_error (__FILE__, __LINE__,
-                     _("default_double_format: bad byte order"));
-    }
-}
-
 /* Misc helper functions for targets. */
 
 CORE_ADDR
@@ -243,43 +197,7 @@ legacy_virtual_frame_pointer (CORE_ADDR pc,
   *frame_offset = 0;
 }
 
-/* Assume the world is sane, every register's virtual and real size
-   is identical.  */
-
-int
-generic_register_size (int regnum)
-{
-  gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
-  return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, regnum));
-}
-
-/* Assume all registers are adjacent.  */
-
-int
-generic_register_byte (int regnum)
-{
-  int byte;
-  int i;
-  gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
-  byte = 0;
-  for (i = 0; i < regnum; i++)
-    {
-      byte += generic_register_size (i);
-    }
-  return byte;
-}
-
 \f
-int
-legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
-{
-#if defined (DEPRECATED_IN_SIGTRAMP)
-  return DEPRECATED_IN_SIGTRAMP (pc, name);
-#else
-  return name && strcmp ("_sigtramp", name) == 0;
-#endif
-}
-
 int
 generic_convert_register_p (int regnum, struct type *type)
 {
@@ -299,6 +217,13 @@ generic_instruction_nullified (struct gdbarch *gdbarch,
   return 0;
 }
 
+int
+default_remote_register_number (struct gdbarch *gdbarch,
+                               int regno)
+{
+  return regno;
+}
+
 \f
 /* Functions to manipulate the endianness of the target.  */
 
@@ -316,13 +241,22 @@ static const char *endian_enum[] =
 };
 static const char *set_endian_string;
 
+enum bfd_endian
+selected_byte_order (void)
+{
+  if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
+    return TARGET_BYTE_ORDER;
+  else
+    return BFD_ENDIAN_UNKNOWN;
+}
+
 /* Called by ``show endian''.  */
 
 static void
 show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
             const char *value)
 {
-  if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
+  if (target_byte_order_user == BFD_ENDIAN_UNKNOWN)
     if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
       fprintf_unfiltered (file, _("The target endianness is set automatically "
                                  "(currently big endian)\n"));
This page took 0.025038 seconds and 4 git commands to generate.