This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Can't set architecture to m32c on m32c-elf-gdb.


Hi Masaki,

I figured out the reason about this issue.
This is caused by a bug in bfd/cpu-m32c.c.

The condision is like this:
He expects to select arch_info_struct[0] when he puts "set architecture m32c".
But bfd_m32c_arch is selected bfd_default_scan(). So he always gets
configuration for m16c instead of m32c.

But as Daniel pointed out, if the user enters the command:


set architecture m32c:m32c

then the code in bfd_default_scan() will select the m32c architecture and if the user enters:

set architecture m32c:m16c

then bfd_default_scan() will select the m16c architecture.

I think printable names in bfd/cpu-m32.c should be changed to "m32c:m16c", "m32c:m32c".

There is no need for this, and in fact it will stop bfd_default_scan from working as intended.


Cheers
  Nick


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