aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
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/rs6000-tdep.c
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/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 d03d36d..d0a3c03 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;