From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17341 invoked by alias); 1 Aug 2002 19:02:19 -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 17288 invoked from network); 1 Aug 2002 19:02:18 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 1 Aug 2002 19:02:18 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E57EC3C63; Thu, 1 Aug 2002 15:02:18 -0400 (EDT) Message-ID: <3D4985BA.1080308@ges.redhat.com> Date: Thu, 01 Aug 2002 12:02:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020708 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] mips n64 support, part 1 References: <1020731182328.ZM22007@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00008.txt.bz2 > @@ -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. Andrew