From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18285 invoked by alias); 1 Aug 2002 19:06:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18278 invoked from network); 1 Aug 2002 19:06:48 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 1 Aug 2002 19:06:48 -0000 Received: from dsl254-114-118.nyc1.dsl.speakeasy.net ([216.254.114.118] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17aLHd-0001Dx-00; Thu, 01 Aug 2002 14:06:49 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17aLHg-0003P2-00; Thu, 01 Aug 2002 15:06:52 -0400 Date: Thu, 01 Aug 2002 12:06:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Kevin Buettner , gdb-patches@sources.redhat.com Subject: Re: [PATCH] mips n64 support, part 1 Message-ID: <20020801190652.GA13050@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Kevin Buettner , gdb-patches@sources.redhat.com References: <1020731182328.ZM22007@localhost.localdomain> <3D4985BA.1080308@ges.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D4985BA.1080308@ges.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-08/txt/msg00010.txt.bz2 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