This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: bfd/cpu-powerpc.c problems
> I wasn't aware that gdb used bfd_lookup_arch in this way, and the
> > description of bfd_lookup_arch says nothing about the order of
> > entries in the list. I guess I can claim gdb is relying on
> > undocumented behaviour.
Well, there is nothing saying GDB can't exploit this and it works for
all other targets :-)
> Er... I'll let Cagney answer that. I think he did though...
GDB needs to be able to efficiently iterate over all machine variants
for a given architecture. If there is a documented interface added I
guess GDB can use it. Two come to mind:
bfd_lookup_arch (arch,-1) returns first, use ->next
bfd_map_over_arch (arch, ....) like map_over_sections
BTW, GDB also needs to know BFD's default architecture and BFD vector.
I asked about that a while back but didn't get any hints. It currently
uses, er, magic. (Knowing these defaults makes it possible for GDB to
start up with the same settings as binutils)
enjoy,
Andrew