Re: [Patch] arch recognition fix for osabi.c

Kevin Buettner
2003-06-19T22:10:22Z

On Jun 19, 3:08pm, Daniel Jacobowitz wrote:

> All calls to gdbarch_register_osabi in GDB except for two use mach ==
> 0. The two are mips-linux-tdep.c, which appears to be solving the same
> problem - what a coincidence:
> for (arch_info = bfd_lookup_arch (bfd_arch_mips, 0);
> arch_info != NULL;
> arch_info = arch_info->next)
> {
> gdbarch_register_osabi (bfd_arch_mips, arch_info->mach, GDB_OSABI_LINUX,
> mips_linux_init_abi);
> }
> and x86-64. For x86-64 your change is correct since BFD will catch the
> different bits-per-word and return NULL. For mips-linux-tdep it would
> let you remove that loop, which I have a vague memory of being annoyed
> at when it became necessary.

Yes, I wrote that loop, and I too was annoyed when I had to write it.

Kevin