From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: [commit/RFC/multiarch/hpux] HPUX_ELF osabi init routine incorrectly registered
Date: Thu, 14 Aug 2003 00:32:00 -0000 [thread overview]
Message-ID: <20030814003222.GK971@gnat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]
Hello,
I noticed while working on the hppa64 target that the HPUX_ELF gdbarch
initialization routine was not called during the gdbarch initialization.
It turns out that we where using the default bfd arch_info descriptor
which corresponds to a 32bit ABI. So when we checked the compatibility
between the arch_info that we registered and the arch_info determined by
the sniffer, we determined that they do not match, and therefore did not
call the assiocated initialization routine.
I fixed the problem the best way I can, by using a hard-coded number
corresponding to the arch_info that corresponds to hppa2.0w. I don't
know BFD too well yet, but it looks like we should really be defining
new #defines in archures.c for each hppa machine numbers, and then use
them here instead of my hard-coded value. I added a FIXME to remind us,
and will send a patch to binutils shortly. In them meantime, this fixes
the problem.
Any opinions, maybe?
2003-08-13 J. Brobecker <brobecker@gnat.com>
* hppa-hpux-tdep.c (_initialize_hppa_hpux_tdep): Use the correct
bfd arch_info when registering the GDB_OSABI_HPUX_ELF initialization
routine.
Tested on hppa64-hpux11.
(I have some other no-brainer patches coming, but I keep being interrupted
by other tasks :-().
--
Joel
[-- Attachment #2: osabi.diff --]
[-- Type: text/plain, Size: 857 bytes --]
Index: hppa-hpux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-hpux-tdep.c,v
retrieving revision 1.8
diff -u -p -r1.8 hppa-hpux-tdep.c
--- hppa-hpux-tdep.c 27 Jul 2003 17:27:17 -0000 1.8
+++ hppa-hpux-tdep.c 14 Aug 2003 00:19:24 -0000
@@ -118,6 +118,9 @@ _initialize_hppa_hpux_tdep (void)
{
gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_HPUX_SOM,
hppa_hpux_som_init_abi);
- gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_HPUX_ELF,
+ /* FIXME brobecker 2003-08-13: The machine number 25 corresponds to
+ the hppa2.0w bfd arch_info. A #define should probably be defined
+ in bfd, instead of using this hard-coded number. */
+ gdbarch_register_osabi (bfd_arch_hppa, 25, GDB_OSABI_HPUX_ELF,
hppa_hpux_elf_init_abi);
}
next reply other threads:[~2003-08-14 0:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-14 0:32 Joel Brobecker [this message]
2003-08-14 2:01 ` Daniel Jacobowitz
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=20030814003222.GK971@gnat.com \
--to=brobecker@gnat.com \
--cc=gdb-patches@sources.redhat.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