aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-01-04 23:38:46 +0000
committerDaniel Jacobowitz <drow@false.org>2003-01-04 23:38:46 +0000
commit4be87837a23001df36ca5a4171eb01dec22856e1 (patch)
tree74f1de6f45a23352eaf4015335241dce25043582 /gdb/gdbarch.h
parenta881cf8e6bbb50470b7286758de18ea3dc3e5b82 (diff)
downloadgdb-4be87837a23001df36ca5a4171eb01dec22856e1.zip
gdb-4be87837a23001df36ca5a4171eb01dec22856e1.tar.gz
gdb-4be87837a23001df36ca5a4171eb01dec22856e1.tar.bz2
* arch-utils.c (gdbarch_info_init): Set osabi to
GDB_OSABI_UNINITIALIZED. * gdbarch.sh: Add osabi to struct gdbarch and to struct gdbarch_info. Include "osabi.h" in gdbarch.c. Check osabi in gdbarch_list_lookup_by_info and in gdbarch_update_p. * gdbarch.c: Regenerated. * gdbarch.h: Regenerated. * osabi.c (gdbarch_lookup_osabi): Return GDB_OSABI_UNINITIALIZED if there's no BFD. (gdbarch_init_osabi): Remove osabi argument; use info.osabi. * osabi.h (enum gdb_osabi): Move to defs.h. (gdbarch_init_osabi): Update prototype. * defs.h (enum gdb_osabi): Moved here. * Makefile.in: Update dependencies. Plus updates to alpha, arm, hppa, i386, mips, ns32k, ppc, sh, sparc, and vax ports to match.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 24e6a11..edb8ade 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -95,6 +95,17 @@ extern int gdbarch_byte_order (struct gdbarch *gdbarch);
#endif
#endif
+extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
+/* set_gdbarch_osabi() - not applicable - pre-initialized. */
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
+#error "Non multi-arch definition of TARGET_OSABI"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_OSABI)
+#define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
+#endif
+#endif
+
/* The following are initialized by the target dependent code. */
@@ -2841,6 +2852,9 @@ struct gdbarch_info
/* Use default: NULL (ZERO). */
struct gdbarch_tdep_info *tdep_info;
+
+ /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
+ enum gdb_osabi osabi;
};
typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);