From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28399 invoked by alias); 24 Sep 2008 13:08:32 -0000 Received: (qmail 28344 invoked by uid 22791); 24 Sep 2008 13:08:31 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 24 Sep 2008 13:07:50 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 5103510CDA; Wed, 24 Sep 2008 13:07:48 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3D0F7101A1; Wed, 24 Sep 2008 13:07:48 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KiU5q-00055e-AC; Wed, 24 Sep 2008 09:07:46 -0400 Date: Wed, 24 Sep 2008 13:08:00 -0000 From: Daniel Jacobowitz To: Richard Stuckey Cc: gdb@sourceware.org Subject: Re: gdb 6.8 selected_byte_order function Message-ID: <20080924130746.GA19429@caradoc.them.org> Mail-Followup-To: Richard Stuckey , gdb@sourceware.org References: <1222253904.3506.12.camel@sad-richards.arc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1222253904.3506.12.camel@sad-richards.arc.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00131.txt.bz2 On Wed, Sep 24, 2008 at 11:58:24AM +0100, Richard Stuckey wrote: > Given that that the variable ‘target_byte_order_user ‘ holds the user’s > preference as specified by the “set endian” command, it seems to me that > the code should be > > if (target_byte_order_user != BFD_ENDIAN_UNKNOWN) > return target_byte_order_user; > else > return gdbarch_byte_order (current_gdbarch); > > i.e. if the user has explicitly specified the byte order then we use > that, otherwise we use the order determined from the current > architecture. This happens at a higher level. When the user sets the byte order, we go through set_endian just below. THe call to gdbarch_update_p changes current_gdbarch. -- Daniel Jacobowitz CodeSourcery