From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26102 invoked by alias); 8 Jan 2004 14:21:47 -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 26095 invoked from network); 8 Jan 2004 14:21:46 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 8 Jan 2004 14:21:46 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Aeb2g-0004VC-93 for ; Thu, 08 Jan 2004 09:21:46 -0500 Date: Thu, 08 Jan 2004 14:21:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [commit/mips] For elf_flags, use the previous arch Message-ID: <20040108142146.GA17207@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <3FFCE551.30009@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FFCE551.30009@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00206.txt.bz2 On Thu, Jan 08, 2004 at 12:06:25AM -0500, Andrew Cagney wrote: > 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". After the "file foo"? I'm confused as to how this case can trigger, since we ought to have info.abfd at that point, right? > 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) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer