+2000-08-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * gdbarch.sh: Multiarch DO_REGISTERS_INFO macro.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * infcmd.c (do_registers_info): Make not static and
+ unconditionalize.
+ * inferior.h (do_registers_info): Export.
+
2000-08-01 Kazu Hirata <kazu@hxi.com>
* MAINTAINERS: Add myself to "Write After Approval" list.
2000-07-31 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+ * sh-tdep.c (sh_push_arguments): Make header match prototype.
+
* remote-e7000.c (e7000_start_remote): Use void *, not char * as
parameter to avoid compiler warning.
(fetch_regs_from_dump): Call get_hex() with the correct number of
gdbarch_register_virtual_size_ftype *register_virtual_size;
int max_register_virtual_size;
gdbarch_register_virtual_type_ftype *register_virtual_type;
+ gdbarch_do_registers_info_ftype *do_registers_info;
int use_generic_dummy_frames;
int call_dummy_location;
gdbarch_call_dummy_address_ftype *call_dummy_address;
0,
0,
0,
+ 0,
generic_get_saved_register,
0,
0,
gdbarch->register_bytes = -1;
gdbarch->max_register_raw_size = -1;
gdbarch->max_register_virtual_size = -1;
+ gdbarch->do_registers_info = do_registers_info;
gdbarch->use_generic_dummy_frames = -1;
gdbarch->call_dummy_start_offset = -1;
gdbarch->call_dummy_breakpoint_offset = -1;
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_virtual_type == 0))
internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
+ /* Skip verify of do_registers_info, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->use_generic_dummy_frames == -1))
internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
"REGISTER_VIRTUAL_TYPE(reg_nr)",
XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
#endif
+#if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DO_REGISTERS_INFO(reg_nr, fpregs)",
+ XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
+#endif
#ifdef USE_GENERIC_DUMMY_FRAMES
fprintf_unfiltered (file,
"gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
(long) current_gdbarch->register_virtual_type
/*REGISTER_VIRTUAL_TYPE ()*/);
#endif
+#ifdef DO_REGISTERS_INFO
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
+ (long) current_gdbarch->do_registers_info
+ /*DO_REGISTERS_INFO ()*/);
+#endif
#ifdef USE_GENERIC_DUMMY_FRAMES
fprintf_unfiltered (file,
"gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
gdbarch->register_virtual_type = register_virtual_type;
}
+void
+gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
+{
+ if (gdbarch->do_registers_info == 0)
+ internal_error ("gdbarch: gdbarch_do_registers_info invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
+ gdbarch->do_registers_info (reg_nr, fpregs);
+}
+
+void
+set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
+ gdbarch_do_registers_info_ftype do_registers_info)
+{
+ gdbarch->do_registers_info = do_registers_info;
+}
+
int
gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
{
data-pointer. */
void *
-gdbarch_data (struct gdbarch_data *data)
+gdbarch_data (data)
+ struct gdbarch_data *data;
{
if (data->index >= current_gdbarch->nr_data)
internal_error ("gdbarch_data: request for non-existant data.");
extern void _initialize_gdbarch (void);
void
-_initialize_gdbarch (void)
+_initialize_gdbarch ()
{
struct cmd_list_element *c;
#endif
#endif
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO)
+#define DO_REGISTERS_INFO(reg_nr, fpregs) (do_registers_info (reg_nr, fpregs))
+#endif
+
+typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs);
+extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
+extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO)
+#define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
+#endif
+#endif
+
extern int gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch);
extern void set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, int use_generic_dummy_frames);
#if GDB_MULTI_ARCH
static void interrupt_target_command (char *args, int from_tty);
-#if !defined (DO_REGISTERS_INFO)
-static void do_registers_info (int, int);
-#endif
-
static void unset_environment_command (char *, int);
static void set_environment_command (char *, int);
all the registers, define the macro DO_REGISTERS_INFO(regnum, fp)
to provide that format. */
-#if !defined (DO_REGISTERS_INFO)
-
-#define DO_REGISTERS_INFO(regnum, fp) do_registers_info(regnum, fp)
-
-static void
+void
do_registers_info (int regnum, int fpregs)
{
register int i;
printf_filtered ("\n");
}
}
-#endif /* no DO_REGISTERS_INFO. */
void
registers_info (char *addr_exp, int fpregs)