mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
* 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user