Fix PR build/1549.
* i386obsd-tdep.c: Update copyright years. Include "solib-svr4.h". (i386obsd_init_abi): Don't set regset_from_core_section here. (i386obsd_aout_init_abi): New function. Set regset_from_core_section here. (i386obsd_elf_init_abi): New function. (_initialize_i386obsd_tdep): Register OS/ABI for OpenBSD ELF. * Makefile.in (i386obsd-tdep.o): Update dependecies. * config/i386/obsd.mt (TDEPFILES): Add solib.o and solib-svr4.o. (TM_FILE): Set to tm-nbsd.h. * config/i386/obsd.mh (NATDEPFILES): Remove solib.o and solib-sunos.o.
This commit is contained in:
parent
41e0a9cab8
commit
60a6eeb650
5 changed files with 60 additions and 13 deletions
|
@ -1,5 +1,20 @@
|
|||
2004-02-21 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
Fix PR build/1549.
|
||||
* i386obsd-tdep.c: Update copyright years. Include
|
||||
"solib-svr4.h".
|
||||
(i386obsd_init_abi): Don't set regset_from_core_section here.
|
||||
(i386obsd_aout_init_abi): New function. Set
|
||||
regset_from_core_section here.
|
||||
(i386obsd_elf_init_abi): New function.
|
||||
(_initialize_i386obsd_tdep): Register OS/ABI for OpenBSD ELF.
|
||||
* Makefile.in (i386obsd-tdep.o): Update dependecies.
|
||||
* config/i386/obsd.mt (TDEPFILES): Add solib.o and solib-svr4.o.
|
||||
(TM_FILE): Set to tm-nbsd.h.
|
||||
|
||||
* config/i386/obsd.mh (NATDEPFILES): Remove solib.o and
|
||||
solib-sunos.o.
|
||||
|
||||
* solib-svr4.h: Update copyright year.
|
||||
(svr4_ilp32_fetch_link_map_offsets)
|
||||
(svr4_lp64_fetch_link_map_offsets): New prototype.
|
||||
|
|
|
@ -1850,7 +1850,7 @@ i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \
|
|||
i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h)
|
||||
i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
|
||||
$(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \
|
||||
$(i386_tdep_h) $(i387_tdep_h)
|
||||
$(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
|
||||
i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \
|
||||
$(i386_tdep_h)
|
||||
i386-stub.o: i386-stub.c
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# Host: Intel 386 running OpenBSD
|
||||
# Host: OpenBSD/i386 ELF
|
||||
|
||||
XM_FILE= xm-i386.h
|
||||
|
||||
NAT_FILE= nm-obsd.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o \
|
||||
solib.o solib-sunos.o
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o
|
||||
|
||||
# The OpenBSD yacc generates yyname and yyrule tables that conflict at
|
||||
# link time if we define YYDEBUG to a non-zero value.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Target: Intel 386 running OpenBSD
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o corelow.o
|
||||
TM_FILE= tm-i386.h
|
||||
# Target: OpenBSD/i386
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o corelow.o \
|
||||
solib.o solib-svr4.o
|
||||
TM_FILE= tm-nbsd.h
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Target-dependent code for OpenBSD/i386.
|
||||
|
||||
Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003
|
||||
Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002,
|
||||
2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
@ -32,6 +33,7 @@
|
|||
|
||||
#include "i386-tdep.h"
|
||||
#include "i387-tdep.h"
|
||||
#include "solib-svr4.h"
|
||||
|
||||
/* From <machine/reg.h>. */
|
||||
static int i386obsd_r_reg_offset[] =
|
||||
|
@ -130,10 +132,6 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
|||
tdep->gregset_num_regs = ARRAY_SIZE (i386obsd_r_reg_offset);
|
||||
tdep->sizeof_gregset = 16 * 4;
|
||||
|
||||
/* OpenBSD has a single register set. */
|
||||
set_gdbarch_regset_from_core_section
|
||||
(gdbarch, i386obsd_aout_regset_from_core_section);
|
||||
|
||||
/* OpenBSD uses -freg-struct-return by default. */
|
||||
tdep->struct_return = reg_struct_return;
|
||||
|
||||
|
@ -146,6 +144,38 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
|||
tdep->sc_reg_offset = i386obsd_sc_reg_offset;
|
||||
tdep->sc_num_regs = ARRAY_SIZE (i386obsd_sc_reg_offset);
|
||||
}
|
||||
|
||||
/* OpenBSD a.out. */
|
||||
|
||||
static void
|
||||
i386obsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386obsd_init_abi (info, gdbarch);
|
||||
|
||||
/* OpenBSD a.out has a single register set. */
|
||||
set_gdbarch_regset_from_core_section
|
||||
(gdbarch, i386obsd_aout_regset_from_core_section);
|
||||
}
|
||||
|
||||
/* OpenBSD ELF. */
|
||||
|
||||
static void
|
||||
i386obsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
|
||||
/* It's still OpenBSD. */
|
||||
i386obsd_init_abi (info, gdbarch);
|
||||
|
||||
/* But ELF-based. */
|
||||
i386_elf_init_abi (info, gdbarch);
|
||||
|
||||
/* OpenBSD ELF uses SVR4-style shared libraries. */
|
||||
set_gdbarch_in_solib_call_trampoline
|
||||
(gdbarch, generic_in_solib_call_trampoline);
|
||||
set_solib_svr4_fetch_link_map_offsets
|
||||
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
|
||||
}
|
||||
|
||||
|
||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
||||
|
@ -161,5 +191,7 @@ _initialize_i386obsd_tdep (void)
|
|||
#define GDB_OSABI_OPENBSD_AOUT GDB_OSABI_NETBSD_AOUT
|
||||
|
||||
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_OPENBSD_AOUT,
|
||||
i386obsd_init_abi);
|
||||
i386obsd_aout_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_OPENBSD_ELF,
|
||||
i386obsd_elf_init_abi);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue