From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: uweigand@de.ibm.com
Cc: gdb-patches@sourceware.org
Subject: Re: [ping] Re: [rfc] [7/9] Multi-target support: Fix GDB_OSABI_OPENBSD_AOUT problem
Date: Fri, 16 Nov 2007 23:29:00 -0000 [thread overview]
Message-ID: <200711162329.lAGNTjPW014943@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <200711150105.lAF15dkN020840@d12av02.megacenter.de.ibm.com> (uweigand@de.ibm.com)
> Date: Thu, 15 Nov 2007 02:05:39 +0100 (CET)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
>
> Mark Kettenis wrote:
>
> > Sorry; I didn't have the time to test this diff until now.
> > Unfortunately it breaks OpenBSD/i386. The problem is that
> > OpenBSD/i386 still uses a core file format that's classified as NetBSD
> > a.out. NetBSD doesn't use this format anymore, so I think the
> > solution is to sacrifice NetBSD/i386 a.out instead of OpenBSD/i386
> > a.out.
>
> I see; that would work for me as well. Something like the
> following patch?
Works for me on OpenBSD/i386.
> ChangeLog:
>
> * i386nbsd-tdep.c (i386nbsd_aout_supply_regset): Remove.
> (i386nbsd_aout_regset_from_core_section): Likewise.
> (i386nbsd_aout_init_abi): Likewise.
> (_initialize_i386nbsd_tdep): Do not register i386nbsd_aout_init_abi.
>
> * vaxnbsd-tdep.c (vaxnbsd_aout_init_abi): Remove.
> (_initialize_vaxnbsd_tdep): Do not register vaxnbsd_aout_init_abi.
>
>
> diff -urNp gdb-orig/gdb/i386nbsd-tdep.c gdb-head/gdb/i386nbsd-tdep.c
> --- gdb-orig/gdb/i386nbsd-tdep.c 2007-10-30 20:05:37.000000000 +0100
> +++ gdb-head/gdb/i386nbsd-tdep.c 2007-11-15 00:38:14.504963834 +0100
> @@ -56,41 +56,6 @@ static int i386nbsd_r_reg_offset[] =
> 15 * 4 /* %gs */
> };
>
> -static void
> -i386nbsd_aout_supply_regset (const struct regset *regset,
> - struct regcache *regcache, int regnum,
> - const void *regs, size_t len)
> -{
> - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
> -
> - gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
> -
> - i386_supply_gregset (regset, regcache, regnum, regs, tdep->sizeof_gregset);
> - i387_supply_fsave (regcache, regnum, (char *) regs + tdep->sizeof_gregset);
> -}
> -
> -static const struct regset *
> -i386nbsd_aout_regset_from_core_section (struct gdbarch *gdbarch,
> - const char *sect_name,
> - size_t sect_size)
> -{
> - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
> -
> - /* NetBSD a.out core dumps don't use seperate register sets for the
> - general-purpose and floating-point registers. */
> -
> - if (strcmp (sect_name, ".reg") == 0
> - && sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE)
> - {
> - if (tdep->gregset == NULL)
> - tdep->gregset =
> - regset_alloc (gdbarch, i386nbsd_aout_supply_regset, NULL);
> - return tdep->gregset;
> - }
> -
> - return NULL;
> -}
> -
> /* Under NetBSD/i386, signal handler invocations can be identified by the
> designated code sequence that is used to return from a signal handler.
> In particular, the return address of a signal handler points to the
> @@ -242,18 +207,6 @@ i386nbsd_init_abi (struct gdbarch_info i
> tdep->sc_num_regs = ARRAY_SIZE (i386nbsd_sc_reg_offset);
> }
>
> -/* NetBSD a.out. */
> -
> -static void
> -i386nbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
> -{
> - i386nbsd_init_abi (info, gdbarch);
> -
> - /* NetBSD a.out has a single register set. */
> - set_gdbarch_regset_from_core_section
> - (gdbarch, i386nbsd_aout_regset_from_core_section);
> -}
> -
> /* NetBSD ELF. */
>
> static void
> @@ -278,8 +231,6 @@ i386nbsdelf_init_abi (struct gdbarch_inf
> void
> _initialize_i386nbsd_tdep (void)
> {
> - gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETBSD_AOUT,
> - i386nbsdaout_init_abi);
> gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETBSD_ELF,
> i386nbsdelf_init_abi);
> }
> diff -urNp gdb-orig/gdb/vaxnbsd-tdep.c gdb-head/gdb/vaxnbsd-tdep.c
> --- gdb-orig/gdb/vaxnbsd-tdep.c 2007-10-30 20:28:29.000000000 +0100
> +++ gdb-head/gdb/vaxnbsd-tdep.c 2007-11-15 00:37:04.223382898 +0100
> @@ -26,13 +26,6 @@
>
> #include "gdb_string.h"
>
> -/* NetBSD a.out. */
> -
> -static void
> -vaxnbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
> -{
> -}
> -
> /* NetBSD ELF. */
>
> static void
> @@ -50,8 +43,6 @@ void _initialize_vaxnbsd_tdep (void);
> void
> _initialize_vaxnbsd_tdep (void)
> {
> - gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_NETBSD_AOUT,
> - vaxnbsd_aout_init_abi);
> gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_NETBSD_ELF,
> vaxnbsd_elf_init_abi);
> }
>
> --
> Dr. Ulrich Weigand
> GNU Toolchain for Linux on System z and Cell BE
> Ulrich.Weigand@de.ibm.com
>
next prev parent reply other threads:[~2007-11-16 23:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 1:18 Ulrich Weigand
2007-10-26 9:21 ` Mark Kettenis
2007-10-29 20:27 ` Ulrich Weigand
2007-10-29 22:53 ` Mark Kettenis
2007-10-30 21:36 ` Ulrich Weigand
2007-11-13 21:27 ` [ping] " Ulrich Weigand
2007-11-14 22:22 ` Mark Kettenis
2007-11-14 22:30 ` Mark Kettenis
2007-11-15 1:05 ` Ulrich Weigand
2007-11-16 23:29 ` Mark Kettenis [this message]
2007-11-17 1:05 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711162329.lAGNTjPW014943@brahms.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox