diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-08-01 14:48:01 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-08-01 14:48:01 +0000 |
commit | 666e11c5d46a0a7a024e1f7326390cce51cd1014 (patch) | |
tree | d98526ec4663de3e5dbc61b0a7e6c07c65afb6d4 /gdb/gdbarch.c | |
parent | 26c11c07fad0e065ec66940a6d00c78a43ed18f3 (diff) | |
download | gdb-666e11c5d46a0a7a024e1f7326390cce51cd1014.zip gdb-666e11c5d46a0a7a024e1f7326390cce51cd1014.tar.gz gdb-666e11c5d46a0a7a024e1f7326390cce51cd1014.tar.bz2 |
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.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index a32eafa..9aaf91a 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -161,6 +161,7 @@ struct gdbarch 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; @@ -296,6 +297,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, + 0, generic_get_saved_register, 0, 0, @@ -381,6 +383,7 @@ gdbarch_alloc (const struct gdbarch_info *info, 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; @@ -523,6 +526,7 @@ verify_gdbarch (struct gdbarch *gdbarch) 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"); @@ -869,6 +873,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "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", @@ -1466,6 +1477,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (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", @@ -2483,6 +2501,23 @@ set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, 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) { @@ -3693,7 +3728,8 @@ init_gdbarch_data (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."); @@ -4085,7 +4121,7 @@ disassemble_info tm_print_insn_info; extern void _initialize_gdbarch (void); void -_initialize_gdbarch (void) +_initialize_gdbarch () { struct cmd_list_element *c; |