From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8227 invoked by alias); 11 Jan 2007 20:51:57 -0000 Received: (qmail 8219 invoked by uid 22791); 11 Jan 2007 20:51:57 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 11 Jan 2007 20:51:47 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H56tk-0007Zt-Pz; Thu, 11 Jan 2007 15:51:44 -0500 Date: Thu, 11 Jan 2007 20:51:00 -0000 From: Daniel Jacobowitz To: Michael Eager Cc: gdb@sources.redhat.com Subject: Re: Identifying PowerPC architecture Message-ID: <20070111205144.GA29057@nevyn.them.org> Mail-Followup-To: Michael Eager , gdb@sources.redhat.com References: <45A6A23F.3000605@eagercon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45A6A23F.3000605@eagercon.com> User-Agent: Mutt/1.5.13 (2006-08-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: 2007-01/txt/msg00194.txt.bz2 On Thu, Jan 11, 2007 at 12:46:55PM -0800, Michael Eager wrote: > I'm looking at how gdb decides which arch/mach it is > working with for PowerPC. It looks like it always picks up > rs6000:6000 as processor type. > > When rs6000_gdbarch_init(struct gdbarch_info info, > struct gdbarch_list *arches) is called, arches is NULL. > As a result, it creates up a default arch/mach based on > info.bfd_arch_info. ->arches is a list of previously initialized gdbarches. They're initialized by other calls to rs6000_gdbarch_init. gdbarch_list_lookup_by_info will only return something with the same bfd_arch_info as it is passed. So, if you're not getting the right arch, you're probably not starting with the right bfd_arch_info. I don't know if PowerPC tags binaries with the processor; I don't remember any such markings for PowerPC. -- Daniel Jacobowitz CodeSourcery