This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] mips n64 support, part 1
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at ges dot redhat dot com>
- Cc: Kevin Buettner <kevinb at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Thu, 1 Aug 2002 15:06:52 -0400
- Subject: Re: [PATCH] mips n64 support, part 1
- References: <1020731182328.ZM22007@localhost.localdomain> <3D4985BA.1080308@ges.redhat.com>
On Thu, Aug 01, 2002 at 03:02:18PM -0400, Andrew Cagney wrote:
> >@@ -4352,7 +4354,11 @@ mips_gdbarch_init (struct gdbarch_info i
> > break;
> > case bfd_mach_mips8000:
> > case bfd_mach_mips10000:
> >- mips_abi = MIPS_ABI_N32;
> >+ if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
> >+ && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
> >+ mips_abi = MIPS_ABI_N64;
> >+ else
> >+ mips_abi = MIPS_ABI_N32;
> > break;
> > }
> > }
>
> This bit should at least have a comment explaining the assumptions
> behind it -- have you actually seen this code being triggered? I don't
> think the code is ever reached (unless the executable is very old) as
> the earlier:
>
> /* GCC creates a pseudo-section whose name describes the ABI. */
> if (mips_abi == MIPS_ABI_UNKNOWN && info.abfd != NULL)
> bfd_map_over_sections (info.abfd, mips_find_abi_section, &mips_abi);
>
> should catch most modern cases.
Kevin is using IRIX CC, I believe. The marker sections are
GCC-specific.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer