From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24411 invoked by alias); 24 Oct 2003 04:12:09 -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 24399 invoked from network); 24 Oct 2003 04:12:07 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 24 Oct 2003 04:12:07 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1ACtJ1-00052I-9h; Fri, 24 Oct 2003 00:12:07 -0400 Date: Fri, 24 Oct 2003 04:12:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Fix gdb/1426: osabi initialization race condition Message-ID: <20031024041207.GA19243@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <3F98921A.9040302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F98921A.9040302@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00719.txt.bz2 On Thu, Oct 23, 2003 at 10:44:42PM -0400, Andrew Cagney wrote: > Hello, > > ref: http://sources.redhat.com/gdb/bugs/1426 for details. > > The attached implements the "hack" suggested in tdep/1426 to work around > a bogus error message: > > A handler for the OS ABI "GNU/Linux" is not built into this > configuration of GDB. Attempting to continue with the default > rs6000:6000 settingsGNU gdb 2003-10-23-cvs > Copyright 2003 Free Software Foundation, Inc. > ... > > that appears on some platforms during startup. > > Baring comment, I'll commit this in a few days. > > Andrew This is a rather unfortunate hack. This is the way it is now, I think: - first architecture is created - per-file init: - then the target's tdep file creates the osabi But you've changed it to: - application startup - osabi is set to uninitialized - first architecture is created - per-file init - then osabi.c sets user_osabi_default - then the target's tdep file creates the osabi (or these two switched, no difference) This means that if per-file initialization doesn't happen then the default osabi is never set. But one of the points of setting a compile-time default OS ABI was so that even if not given a file, GDB would get the right default. This patch will break using gdbserver on an arm-linux target without loading a file into GDB (unless set osabi is used, of course). Also, one thing I couldn't figure out from the code - why does this happen on some targets and not others? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer