From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30121 invoked by alias); 31 Dec 2009 12:22:42 -0000 Received: (qmail 30098 invoked by uid 22791); 31 Dec 2009 12:22:41 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Dec 2009 12:22:36 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBVCMVws003564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 31 Dec 2009 07:22:31 -0500 Received: from [10.36.7.43] (vpn1-7-43.ams2.redhat.com [10.36.7.43]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBVCMSgQ027911; Thu, 31 Dec 2009 07:22:29 -0500 Message-ID: <4B3C9784.1040309@redhat.com> Date: Thu, 31 Dec 2009 12:22:00 -0000 From: Nick Clifton User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Masaki Muranaka CC: Daniel Jacobowitz , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: Can't set architecture to m32c on m32c-elf-gdb. References: <20081203140802.GA6965@caradoc.them.org> <50B2818F-7217-4D63-ABE8-19E444FE9A40@monami-software.com> In-Reply-To: <50B2818F-7217-4D63-ABE8-19E444FE9A40@monami-software.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00468.txt.bz2 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