This is the mail archive of the gdb@sources.redhat.com 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]

bfd/cpu-powerpc.c problems



Hi, 

When this change went in,
http://sources.redhat.com/ml/binutils/2002-02/msg00146.html

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[0]

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.

Thanks
Elena



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