This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Identifying PowerPC architecture
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Eager <eager at eagercon dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 11 Jan 2007 15:51:44 -0500
- Subject: Re: Identifying PowerPC architecture
- References: <45A6A23F.3000605@eagercon.com>
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