This is the mail archive of the
mailing list for the GDB project.
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: amodra at bigpond dot net dot au, binutils at sources dot redhat dot com
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 18 Apr 2002 17:41:07 -0400
- Subject: bfd/cpu-powerpc.c problems
When this change went in,
the function bfd_lookup_arch stopped returning a list of all the
powerpc machines when called with arch==bfd_arch_powerpc, and machine==0 as
parameters. This in turn caused the "set architecture" command in gdb
to behave incorrectly.
The problem is the lack of a pointer to the first element of the
bfd_powerpc_archs array from the entry for the default machine. Gdb is
relying on retrieving a chain of all the machines available starting
from the default one.
Adding such a pointer back however requires to break the chain
somewhere else (to avoid infinite recursion), and now the search in
bfd_lookup_arch never reaches the default machine, because the start
point of the search was changed as well by this define in archures.c:
#define bfd_powerpc_arch bfd_powerpc_archs
I couldn't find the beginning of the discussion in the archives, so I
am not clear as to what JimiX was trying to solve, but this seems not
to be a correct solution.