From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14457 invoked by alias); 11 Jan 2007 21:04:08 -0000 Received: (qmail 14446 invoked by uid 22791); 11 Jan 2007 21:04:07 -0000 X-Spam-Check-By: sourceware.org Received: from shell4.bayarea.net (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 Jan 2007 21:03:59 +0000 Received: (qmail 19823 invoked from network); 11 Jan 2007 13:03:58 -0800 Received: from 209-128-106-254.bayarea.net (HELO ?192.168.20.7?) (209.128.106.254) by shell4.bayarea.net with SMTP; 11 Jan 2007 13:03:58 -0800 Message-ID: <45A6A63D.9090007@eagercon.com> Date: Thu, 11 Jan 2007 21:04:00 -0000 From: Michael Eager User-Agent: Thunderbird 1.5.0.7 (X11/20060913) MIME-Version: 1.0 To: Michael Eager , gdb@sources.redhat.com Subject: Re: Identifying PowerPC architecture References: <45A6A23F.3000605@eagercon.com> <20070111205144.GA29057@nevyn.them.org> In-Reply-To: <20070111205144.GA29057@nevyn.them.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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/msg00195.txt.bz2 Daniel Jacobowitz wrote: > 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. I don't see where that happens, but I'll take your word. > 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. Nope, there's no model info for PowerPC in the ELF file. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077