From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9285 invoked by alias); 10 Oct 2009 09:21:15 -0000 Received: (qmail 9272 invoked by uid 22791); 10 Oct 2009 09:21:14 -0000 X-SWARE-Spam-Status: Yes, hits=6.3 required=5.0 tests=BAYES_50,CTYME_IXHASH,MIME_BASE64_TEXT,MIME_CHARSET_FARAWAY,RDNS_DYNAMIC,SPF_PASS X-Spam-Check-By: sourceware.org Received: from adsl-61-66-25-189.BC.sparqnet.net (HELO mswedge2.sunplus.com) (61.66.25.189) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Oct 2009 09:21:09 +0000 In-Reply-To: <000f01ca442a$4bc5f460$e351dd20$@u-strasbg.fr> To: "Pierre Muller" Cc: "'Joel Brobecker'" , donlee@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Subject: RE: [PING] About score-tdep commit Message-ID: From: don.lee@sunplusct.com Date: Sat, 10 Oct 2009 09:21:00 -0000 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: base64 X-IsSubscribed: yes 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-10/txt/msg00207.txt.bz2 IlBpZXJyZSBNdWxsZXIiIDxtdWxsZXJAaWNzLnUtc3RyYXNiZy5mcj4g0LTT 2iAyMDA5LTEwLTAzIDIxOjA2OjE1Og0KDQo+IEhpIERvbiwNCj4gaXQgbG9v a3MgbGlrZSB5b3UgaGF2ZSBjb21taXR0ZWQNCj4gc29tZSBjaGFuZ2VzIHRv IHNjb3JlLXRkZXAuYyBhbmQgc2NvcmUtdGRlcC5oDQo+IG9uIFNlcHRlbWJl ciAyNy4gDQo+ICAgSSBvbmx5IHJlYWxpemVkIHRoaXMgdG9kYXkuLi4NCg0K TXkgZmF1bHQsIEkgZGlkbid0IHBvc3QgbXkgcGF0Y2ggdG8gZ2RiLXBhdGNo ZXMsIG5leHQgdGltZQ0KSSdsbCBkbyB0aGlzLg0KDQo+IA0KPiAgIFRoaXMg Y29tbWl0IGlzIG9ubHkgaW4gbWFpbiBicmFuY2gsDQo+IHNob3VsZG4ndCB0 aGlzIGFsc28gYmUgaW5jbHVkZWQgaW4gZ2RiIDcuMCBicmFuY2gNCj4gYXMg aXQgcmVtb3ZlcyBjb2RlIHRoYXQgaXMgc3VyZWx5IGJyb2tlbiBpbiANCj4g dGhlIGJyYW5jaD8NCj4gDQoNClllcywgaXQgc2hvdWxkIGJlLiBTaG91bGQg SSB3cml0ZSB0aGlzIGNoYW5nZSB0byA3LjAgYnJhbmNoIChsb29rcw0KbGlr ZSBJIGNhbid0IHdyaXRlIHRvIHRoaXMgYnJhbmNoKSBvciBvdGhlciBvbmUg d2lsbCBkbyB0aGlzPw0KDQpkb24NCg0K >From gdb-patches-return-67585-listarch-gdb-patches=sources.redhat.com@sourceware.org Sat Oct 10 10:23:09 2009 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 14719 invoked by alias); 10 Oct 2009 10:23:08 -0000 Received: (qmail 14697 invoked by uid 22791); 10 Oct 2009 10:23:07 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Oct 2009 10:22:57 +0000 Received: (qmail 6736 invoked from network); 10 Oct 2009 10:22:55 -0000 Received: from unknown (HELO ?192.168.1.100?) (ams@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Oct 2009 10:22:55 -0000 Message-ID: <4AD0607C.9020001@codesourcery.com> Date: Sat, 10 Oct 2009 10:23:00 -0000 From: Andrew Stubbs User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [PATCH][SH] Fix a few architecture variant settings Content-Type: multipart/mixed; boundary="------------040007060309050907040208" 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 Delivered-To: mailing list gdb-patches@sourceware.org X-SW-Source: 2009-10/txt/msg00208.txt.bz2 This is a multi-part message in MIME format. --------------040007060309050907040208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 907 Hi, I recently noticed that GDB claims that the 'fake' SH architecture "sh2a-or-sh4" does not have FP registers: (gdb) show architecture The target architecture is set automatically (currently sh2a-or-sh4) (gdb) info float No floating-point info available for this processor. This is not true - sh2a-or-sh4 is the intersection between the SH-2A and SH-4 architectures, both of which have double-precision FP. This assembler/linker automatically select this architecture when FP instructions are used, but they cannot tell which architecture was intended (the two architectures are incompatible in some ways, but there are a set of programs that will run on both). When examining the source I also noticed that a number of architectures have no specific 'regs' command variant configured (causing them to default to the most basic variant). This patch solves both problem problems. OK? Andrew --------------040007060309050907040208 Content-Type: text/x-diff; name="sh2a-or-sh4-gdb.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sh2a-or-sh4-gdb.patch" Content-length: 1979 2009-10-10 Andrew Stubbs * sh-tdep.c (sh_gdbarch_init): Add show_regs settings for bfd_mach_sh3_nommu, bfd_mach_sh2a_nofpu_or_sh3_nommu, bfd_mach_sh2a_or_sh3e, bfd_mach_sh2a_or_sh4, bfd_mach_sh4_nommu_nofpu, and bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu. Move bfd_mach_sh2a_or_sh4 to use the same configuration as bfd_mach_sh4. --- gdb/sh-tdep.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) --- gdb/sh-tdep.c +++ gdb/sh-tdep.c @@ -2762,10 +2762,13 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; case bfd_mach_sh3: + case bfd_mach_sh3_nommu: + case bfd_mach_sh2a_nofpu_or_sh3_nommu: sh_show_regs = sh3_show_regs; break; case bfd_mach_sh3e: + case bfd_mach_sh2a_or_sh3e: sh_show_regs = sh3e_show_regs; break; @@ -2776,11 +2779,14 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case bfd_mach_sh4: case bfd_mach_sh4a: + case bfd_mach_sh2a_or_sh4: sh_show_regs = sh4_show_regs; break; case bfd_mach_sh4_nofpu: + case bfd_mach_sh4_nommu_nofpu: case bfd_mach_sh4a_nofpu: + case bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu: sh_show_regs = sh4_nofpu_show_regs; break; @@ -2914,6 +2920,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case bfd_mach_sh4: case bfd_mach_sh4a: + case bfd_mach_sh2a_or_sh4: set_gdbarch_register_name (gdbarch, sh_sh4_register_name); set_gdbarch_register_type (gdbarch, sh_sh4_register_type); set_gdbarch_fp0_regnum (gdbarch, 25); @@ -2928,7 +2935,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case bfd_mach_sh4a_nofpu: case bfd_mach_sh4_nommu_nofpu: case bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu: - case bfd_mach_sh2a_or_sh4: set_gdbarch_register_name (gdbarch, sh_sh4_nofpu_register_name); break; --------------040007060309050907040208--