This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Can't set architecture to m32c on m32c-elf-gdb.
- From: Masaki Muranaka <monaka at monami-software dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Sun, 3 Jan 2010 09:00:30 +0900
- Subject: Re: Can't set architecture to m32c on m32c-elf-gdb.
- References: <DD44C478-4E49-4C47-98AB-06DDD086DC40@monami-software.com> <20081203140802.GA6965@caradoc.them.org> <50B2818F-7217-4D63-ABE8-19E444FE9A40@monami-software.com> <4B3C9784.1040309@redhat.com>
Hello Nick,
Really did you try them? Here is a log of my GDB.
(gdb) show architecture
The target architecture is set automatically (currently m16c)
(gdb) set architecture m32c:m32c
Undefined item: "m32c:m32c".
(gdb) set architecture m32c:m16c
Undefined item: "m32c:m16c".
I got their sources via official git repository.
Thanks,
On 2009/12/31, at 21:22, Nick Clifton wrote:
> 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
>