From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19146 invoked by alias); 8 Jan 2004 05:06:33 -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 19129 invoked from network); 8 Jan 2004 05:06:31 -0000 Received: from unknown (HELO localhost.redhat.com) (65.49.3.48) by sources.redhat.com with SMTP; 8 Jan 2004 05:06:31 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C148B2B8F; Thu, 8 Jan 2004 00:06:25 -0500 (EST) Message-ID: <3FFCE551.30009@gnu.org> Date: Thu, 08 Jan 2004 05:06:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit/mips] For elf_flags, use the previous arch Content-Type: multipart/mixed; boundary="------------000106070803040102070801" X-SW-Source: 2004-01/txt/msg00197.txt.bz2 This is a multi-part message in MIME format. --------------000106070803040102070801 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 211 Hello, This fixes a subtle edge case. Given the sequence: (gdb) file foo (gdb) set mipsfpu none (gdb) file foo An extra, unnecessary arch was being created after the second "file foo". committed, Andrew --------------000106070803040102070801 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 780 2004-01-07 Andrew Cagney * mips-tdep.c (mips_gdbarch_init): Set elf_flags to the previous architecture's elf flags (when available). Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.267 diff -u -r1.267 mips-tdep.c --- mips-tdep.c 8 Jan 2004 04:57:38 -0000 1.267 +++ mips-tdep.c 8 Jan 2004 05:02:23 -0000 @@ -5688,6 +5688,8 @@ /* First of all, extract the elf_flags, if available. */ if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour) elf_flags = elf_elfheader (info.abfd)->e_flags; + else if (arches != NULL) + elf_flags = gdbarch_tdep (arches->gdbarch)->elf_flags; else elf_flags = 0; if (gdbarch_debug) --------------000106070803040102070801--