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

Daniel Jacobowitz drow@mvista.com
Thu Aug 14 02:01:00 GMT 2003


On Wed, Aug 13, 2003 at 05:32:22PM -0700, Joel Brobecker wrote:
> 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?

Seems right to me, on all counts.  But would you mind sending the BFD
patch first and then using the machine #define in GDB?  It's just a
matter of adding the define and regenerating bfd-in2.h.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list