diff options
author | Daniel Jacobowitz <dan@debian.org> | 2003-01-04 23:38:46 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2003-01-04 23:38:46 +0000 |
commit | 558e6e64057df0d0d7f57f3c547585ef4cd02a0b (patch) | |
tree | 4958a2578cfb4a1396f130859ae9fd429471969f /gdb/osabi.c | |
parent | e48d53e24d65c826405158b0ec495107efe36e66 (diff) | |
download | gdb-558e6e64057df0d0d7f57f3c547585ef4cd02a0b.tar.gz |
* 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/osabi.c')
-rw-r--r-- | gdb/osabi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/osabi.c b/gdb/osabi.c index 47d08a2ebce..d856beae122 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -1,5 +1,5 @@ /* OS ABI variant handling for GDB. - Copyright 2001, 2002 Free Software Foundation, Inc. + Copyright 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GDB. @@ -171,6 +171,9 @@ gdbarch_lookup_osabi (bfd *abfd) enum gdb_osabi osabi, match; int match_specific; + if (abfd == NULL) + return GDB_OSABI_UNINITIALIZED; + match = GDB_OSABI_UNKNOWN; match_specific = 0; @@ -234,14 +237,13 @@ gdbarch_lookup_osabi (bfd *abfd) } void -gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch, - enum gdb_osabi osabi) +gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch) { const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch); const struct bfd_arch_info *compatible; struct gdb_osabi_handler *handler; - if (osabi == GDB_OSABI_UNKNOWN) + if (info.osabi == GDB_OSABI_UNKNOWN) { /* Don't complain about an unknown OSABI. Assume the user knows what they are doing. */ @@ -251,7 +253,7 @@ gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch, for (handler = gdb_osabi_handler_list; handler != NULL; handler = handler->next) { - if (handler->osabi != osabi) + if (handler->osabi != info.osabi) continue; /* Check whether the machine type and architecture of the @@ -279,7 +281,7 @@ gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch, "A handler for the OS ABI \"%s\" is not built into this " "configuration of GDB. " "Attempting to continue with the default %s settings", - gdbarch_osabi_name (osabi), + gdbarch_osabi_name (info.osabi), bfd_printable_arch_mach (arch_info->arch, arch_info->mach)); } |