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/hppa-tdep.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/hppa-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 9fad7aa3d3a..0d57c0eccbb 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -4945,19 +4945,13 @@ static struct gdbarch * hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { struct gdbarch *gdbarch; - enum gdb_osabi osabi = GDB_OSABI_UNKNOWN; /* Try to determine the ABI of the object we are loading. */ - - if (info.abfd != NULL) + if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN) { - osabi = gdbarch_lookup_osabi (info.abfd); - if (osabi == GDB_OSABI_UNKNOWN) - { - /* If it's a SOM file, assume it's HP/UX SOM. */ - if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour) - osabi = GDB_OSABI_HPUX_SOM; - } + /* If it's a SOM file, assume it's HP/UX SOM. */ + if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour) + info.osabi = GDB_OSABI_HPUX_SOM; } /* find a candidate among the list of pre-declared architectures. */ @@ -4969,7 +4963,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) gdbarch = gdbarch_alloc (&info, NULL); /* Hook in ABI-specific overrides, if they have been registered. */ - gdbarch_init_osabi (info, gdbarch, osabi); + gdbarch_init_osabi (info, gdbarch); set_gdbarch_reg_struct_has_addr (gdbarch, hppa_reg_struct_has_addr); set_gdbarch_function_start_offset (gdbarch, 0); |