From d658f92455f2ea77eb2c9723ecfbc235c40df6c0 Mon Sep 17 00:00:00 2001 From: Jason Thorpe Date: Wed, 8 May 2002 14:54:03 +0000 Subject: * sh-tdep.c (sh_osabi_names): Declare. (process_note_abi_tag_sections): New function. (get_elfosabi): Ditto. (sh_gdbarch_register_os_abi): Ditto. (sh_dump_tdep): Ditto. _initialize_sh_tdep): Use gdbarch_register to register sh_gdbarch_init and sh_dump_tdep. * config/sh/tm-sh.h (sh_osabi): Declare. (gdbarch_tdep): Add sh_osabi and osabi_name members. --- gdb/config/sh/tm-sh.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gdb/config/sh/tm-sh.h') diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h index 1690ecf..e65d8cd 100644 --- a/gdb/config/sh/tm-sh.h +++ b/gdb/config/sh/tm-sh.h @@ -23,6 +23,17 @@ #define GDB_MULTI_ARCH 1 +/* ABI variants that we know about. If you add to this enum, please + update the table of names in sh-tdep.c. */ +enum sh_osabi +{ + SH_OSABI_UNKNOWN = 0, + SH_OSABI_LINUX, + SH_OSABI_NETBSD_ELF, + + SH_OSABI_INVALID /* Keep this last. */ +}; + /* Information that is dependent on the processor variant. */ struct gdbarch_tdep @@ -56,6 +67,9 @@ struct gdbarch_tdep int ARGLAST_REGNUM; int FLOAT_ARGLAST_REGNUM; int RETURN_REGNUM; + + enum sh_osabi sh_osabi; /* OS/ABI of the inferior */ + const char *osabi_name; /* Name of the above */ }; /* Registers common to all the SH variants. */ @@ -81,4 +95,3 @@ enum #define LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */ /*#define NOP {0x20, 0x0b}*/ /* Who uses this???*/ - -- cgit v1.1