diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-08-21 16:34:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-08-21 16:34:10 +0000 |
commit | 0ab7a791257080198a22f27a12563758f1e78c96 (patch) | |
tree | fe3c4ffb5bdd9935a68ac144d20d15bd8bb4f471 /gdb/gdbarch.h | |
parent | e23792ccb6d6b4e8e30e5702eaacfd5556e4ac6e (diff) | |
download | gdb-0ab7a791257080198a22f27a12563758f1e78c96.zip gdb-0ab7a791257080198a22f27a12563758f1e78c96.tar.gz gdb-0ab7a791257080198a22f27a12563758f1e78c96.tar.bz2 |
2002-08-21 Andrew Cagney <ac131313@redhat.com>
* infcmd.c (default_print_registers_info): Replace
do_registers_info.
(registers_info): Use gdbarch_print_registers_info instead of
DO_REGISTERS_INFO.
* inferior.h (default_print_registers_info): Replace
do_registers_info.
* gdbarch.sh (PRINT_REGISTERS_INFO): New method.
(DO_REGISTERS_INFO): Change to a predicate function.
* gdbarch.h, gdbarch.c: Regenerate.
2002-08-21 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Document
print_registers_info. Note that DO_REGISTERS_INFO is deprecated.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index f9f6313..d27b7c7 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -778,9 +778,29 @@ extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_ #endif #endif +#if defined (DO_REGISTERS_INFO) +/* Legacy for systems yet to multi-arch DO_REGISTERS_INFO */ +#if !defined (DO_REGISTERS_INFO_P) +#define DO_REGISTERS_INFO_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO_P) +#define DO_REGISTERS_INFO_P() (0) +#endif + +extern int gdbarch_do_registers_info_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO_P) +#error "Non multi-arch definition of DO_REGISTERS_INFO" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO_P) +#define DO_REGISTERS_INFO_P() (gdbarch_do_registers_info_p (current_gdbarch)) +#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)) +#define DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DO_REGISTERS_INFO"), 0) #endif typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs); @@ -795,6 +815,10 @@ extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_r #endif #endif +typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); +extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); +extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info); + extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch); typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); |