#endif
#include "regcache.h"
#include "gdb_assert.h"
+#include "sim-regno.h"
#include "version.h"
return NULL;
}
+int
+legacy_register_sim_regno (int regnum)
+{
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+ /* NOTE: cagney/2002-05-13: The old code did it this way and it is
+ suspected that some GDB/SIM combinations may rely on this
+ behavour. The default should be one2one_register_sim_regno
+ (below). */
+ if (REGISTER_NAME (regnum) != NULL
+ && REGISTER_NAME (regnum)[0] != '\0')
+ return regnum;
+ else
+ return LEGACY_SIM_REGNO_IGNORE;
+}
+
int
generic_frameless_function_invocation_not (struct frame_info *fi)
{
}
void
-default_print_float_info (void)
+default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame)
{
#ifdef FLOAT_INFO
#if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
#endif
FLOAT_INFO;
#else
- printf_filtered ("No floating point info available for this processor.\n");
+ fprintf_filtered (file, "\
+No floating point info available for this processor.\n");
#endif
}
return 0;
}
-int
-default_register_sim_regno (int num)
-{
- return num;
-}
-
-
CORE_ADDR
core_addr_identity (CORE_ADDR addr)
{
flush_cached_frames ();
registers_changed ();
stop_pc = wait_pc;
- select_frame (get_current_frame (), 0);
+ select_frame (get_current_frame ());
}
/* We return 1 to indicate that there is a breakpoint here,
so we need to step over it before continuing to avoid
*frame_offset = 0;
}
-/* Assume the world is flat. Every register is large enough to fit a
- target integer. */
+/* Assume the world is sane, every register's virtual and real size
+ is identical. */
int
-generic_register_raw_size (int regnum)
+generic_register_size (int regnum)
{
gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
- return TARGET_INT_BIT / HOST_CHAR_BIT;
-}
-
-/* Assume the virtual size corresponds to the virtual type. */
-
-int
-generic_register_virtual_size (int regnum)
-{
return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (regnum));
}
return IN_SIGTRAMP(pc, name);
}
+int
+legacy_convert_register_p (int regnum)
+{
+ return REGISTER_CONVERTIBLE (regnum);
+}
+
+void
+legacy_register_to_value (int regnum, struct type *type,
+ char *from, char *to)
+{
+ REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
+}
+
+void
+legacy_value_to_register (struct type *type, int regnum,
+ char *from, char *to)
+{
+ REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
+}
+
\f
/* Functions to manipulate the endianness of the target. */