This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/RFC/multiarch/hpux] HPUX_ELF osabi init routine incorrectly registered


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: osabi.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]