From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23299 invoked by alias); 20 Jan 2002 19:05:38 -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 23256 invoked from network); 20 Jan 2002 19:05:32 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 20 Jan 2002 19:05:32 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16SNHd-0006SB-00; Sun, 20 Jan 2002 14:05:37 -0500 Date: Sun, 20 Jan 2002 11:05:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Eliminate TARGET_BYTE_ORDER_SELECTABLE Message-ID: <20020120140537.A24675@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <3C490B0C.6090601@cygnus.com> <20020119094718.A1404@nevyn.them.org> <3C49A566.1060508@cygnus.com> <20020119120032.A19415@nevyn.them.org> <3C4B0D79.4070005@cygnus.com> <20020120133632.A22738@nevyn.them.org> <3C4B13D1.90007@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C4B13D1.90007@cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00581.txt.bz2 On Sun, Jan 20, 2002 at 02:00:33PM -0500, Andrew Cagney wrote: > >On Sun, Jan 20, 2002 at 01:33:29PM -0500, Andrew Cagney wrote: > > > >>> > >>>Woah! That's neat! I need to remember that :) > >>> > >>>And I suppose I of all people shouldn't be griping about allowing more > >>>endianness choices. I have a patch here to support big-endian > >>>ARM/Linux. All I did was change TARGET_BYTE_ORDER_*. > > > >> > >> > >>Delete it :-) As Michael observed, if the code is written correctly it > >>works from day one. (Problem is it has taken ~10 years to figure out > >>how to correctly write the code :-) > > > > > >Well, I need to set TARGET_BYTE_ORDER_DEFAULT. If you start a cross > >debugger without giving it a binary, and attach to a random remote > >target, then we need to default to the right one. Other than that > >everything is fine, though! > > > Nope! I'm about to delete TARGET_BYTE_ORDER_DEFAULT. > > There is this really nasty bit of code in arch-utils.c that roots around > the internals of BFD and uses that to determine the initial architecture > and byte-order. Doing this ensures that GDB's behavour is better > aligned with that of BINUTILS. > See arch-utils.c:initialize_current_architecture(). > > If GDB initializes its self to the wrong byte-order then there is likely > a bug in BFD. Oh, I see. I -think- this will work correctly for my targets; I'll check after you do it. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer