diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-01-04 23:38:46 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-01-04 23:38:46 +0000 |
commit | 4be87837a23001df36ca5a4171eb01dec22856e1 (patch) | |
tree | 74f1de6f45a23352eaf4015335241dce25043582 /gdb/osabi.c | |
parent | a881cf8e6bbb50470b7286758de18ea3dc3e5b82 (diff) | |
download | gdb-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/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 47d08a2..d856bea 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)); } |