summaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-01-04 23:38:46 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-01-04 23:38:46 +0000
commit558e6e64057df0d0d7f57f3c547585ef4cd02a0b (patch)
tree4958a2578cfb4a1396f130859ae9fd429471969f /gdb/rs6000-tdep.c
parente48d53e24d65c826405158b0ec495107efe36e66 (diff)
downloadgdb-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/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index d03d36d29d3..d0a3c036d55 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -34,6 +34,7 @@
#include "doublest.h"
#include "value.h"
#include "parser-defs.h"
+#include "osabi.h"
#include "libbfd.h" /* for bfd_default_set_arch_mach */
#include "coff/internal.h" /* for libcoff.h */
@@ -2657,7 +2658,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
unsigned long mach;
bfd abfd;
int sysv_abi;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
asection *sect;
from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
@@ -2668,9 +2668,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sysv_abi = info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
- if (info.abfd)
- osabi = gdbarch_lookup_osabi (info.abfd);
-
/* Check word size. If INFO is from a binary file, infer it from
that, else choose a likely default. */
if (from_xcoff_exec)
@@ -2705,7 +2702,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
meaningful, because 64-bit CPUs can run in 32-bit mode. So, perform
separate word size check. */
tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->wordsize == wordsize && tdep->osabi == osabi)
+ if (tdep && tdep->wordsize == wordsize)
return arches->gdbarch;
}
@@ -2731,7 +2728,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
tdep = xmalloc (sizeof (struct gdbarch_tdep));
tdep->wordsize = wordsize;
- tdep->osabi = osabi;
/* For e500 executables, the apuinfo section is of help here. Such
section contains the identifier and revision number of each
@@ -2958,7 +2954,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}
@@ -2971,8 +2967,7 @@ rs6000_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "rs6000_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
+ /* FIXME: Dump gdbarch_tdep. */
}
static struct cmd_list_element *info_powerpc_cmdlist = NULL;