From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22256 invoked by alias); 23 Feb 2012 19:50:21 -0000 Received: (qmail 22241 invoked by uid 22791); 23 Feb 2012 19:50:18 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Feb 2012 19:50:02 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1S0efv-0006Le-SZ from Thomas_Schwinge@mentor.com ; Thu, 23 Feb 2012 11:50:00 -0800 Received: from feldtkeller.schwinge.homeip.net ([172.30.64.62]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 23 Feb 2012 20:49:58 +0100 From: Thomas Schwinge To: gdb-patches@sourceware.org Cc: Kevin Buettner , Kaz Kojima , gcc@gcc.gnu.org, Subject: Re: Simulator testing for sh and sh64 In-Reply-To: <87wr7e8y60.fsf@schwinge.name> References: <87pqdgciho.fsf@schwinge.name> <20120215075413.1313f7fa@mesquite.lan> <20120215165907.33f2e9a6@mesquite.lan> <8739aad9il.fsf@schwinge.name> <20120216182544.36b41a1b@mesquite.lan> <87zkca9azw.fsf@schwinge.name> <20120222093929.7e86fba2@mesquite.lan> <87wr7e8y60.fsf@schwinge.name> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 23 Feb 2012 19:55:00 -0000 Message-ID: <87obsp8h41.fsf@schwinge.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: 2012-02/txt/msg00514.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 2036 Hi! On Wed, 22 Feb 2012 20:29:11 +0100, I wrote: > On Wed, 22 Feb 2012 09:39:29 -0700, Kevin Buettner wr= ote: > > On Wed, 22 Feb 2012 15:52:03 +0100 > > Thomas Schwinge wrote: > > > And, any quick suggestion for a sh64 sim testing configuration, too? = My > > > attempt so far only results in a series of SIGILL... > GDB testing totally breaks down: I'm > receiving a lot of ``Program received signal SIGILL, Illegal > instruction''; from a quick investigation, it seems that GDB is patching > the breakpoints at addresses that are 2 bytes offset from where they > meant to go. I'll have a look at this. I did, but it's turning into a rat's nest -- sh64-tdep needs several years of catch-up, as it seems. The SIGILL issue that I briefly described is what Kevin (hello, hello!) :-) fixed for MIPS in 486ee7f3437358941f0762ace2550170ef474de1, ; basically the issue is that setting PC's bit 0 in sh64_elf_make_msymbol_special for ISA32 (SHmedia) code will confuse GDB's msymbol machinery, resulting first in a 1-byte offset, which is later ``fixed'' into the 2-byte offset that I mentioned. And patching a 4-byte breakpoint instruction into the middle of two 4-byte instructions is very likely to cause a SIGILL. I have begun hacking into sh64-tdep the same kind of changes that Kevin did for MIPS, but there's more to do, as I'm now seeing ``odd addresses'' for symbols coming out of GDB's symbol table lookup, find_pc_line. Again, the addresses point into the middle of 4-byte instructions. This may be an issue with the debugging information GCC generates, or it may be something else. For the time being, I'm stopping at this point. Anyway, the patch for sh-tdep that I posted in (at the end) also applies to sh64-tdep -- shall I commit the equivalent sh64-tdep change without any testsuite testing, or let it bit-rot some more? Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 489 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJPRpheAAoJENuKOtuXzphJRXoH/3FkuxrqXRbP3DgI0hR7OAXC Icj6jXUxSfY7NAyaBiDbIirgvj9HvUcrGdugq4Dw6ERjKnX8R7k62XTKIZjZoa/s 6BZAb/eFqWwZU79PIYIWQjfNrJOETL+QZxkMS9L1qsIgj5KTM0IKf+TTm3qlrYq5 Mn8u1T9k2/H6KX67IGfz5QT+yrs6vYcPYwvpi3UwEs7qBgZ6pgQUjR1TeCuWE330 SokWGb/jmBt8ccZnTODbSRhIWPIlXdjf7Ojv8zcbtbXI/W8t8WR4FcZ9+aPQel7I 4jWZqsOBWBy0mTyJObDOxD293gvln8cz8si9ZdIRtMzIXZRwa1Yj2ETwCt8rtyQ= =IInU -----END PGP SIGNATURE----- --=-=-=--