This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Identifying PowerPC architecture


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]