Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Kevin Buettner <kevinb@redhat.com>,
	Kaz Kojima <kkojima@rr.iij4u.or.jp>, gcc@gcc.gnu.org,
Subject: Re: Simulator testing for sh and sh64
Date: Thu, 23 Feb 2012 19:55:00 -0000	[thread overview]
Message-ID: <87obsp8h41.fsf@schwinge.name> (raw)
In-Reply-To: <87wr7e8y60.fsf@schwinge.name>

[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]

Hi!

On Wed, 22 Feb 2012 20:29:11 +0100, I wrote:
> On Wed, 22 Feb 2012 09:39:29 -0700, Kevin Buettner <kevinb@redhat.com> wrote:
> > On Wed, 22 Feb 2012 15:52:03 +0100
> > Thomas Schwinge <thomas@codesourcery.com> 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,
<http://sourceware.org/ml/gdb-patches/2010-12/msg00202.html>; 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
<http://sourceware.org/ml/gdb-patches/2012-02/msg00299.html> (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üße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

  parent reply	other threads:[~2012-02-23 19:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 14:00 [PATCH] [SH] Prologue skipping if there is none Thomas Schwinge
2012-02-15 14:54 ` Pedro Alves
2012-02-16 15:27   ` [PATCH] [SH] GDB crash in sh_is_renesas_calling_convention, TYPE_CALLING_CONVENTION (was: Prologue skipping if there is none) Thomas Schwinge
2012-02-16 19:38     ` [PATCH] [SH] GDB crash in sh_is_renesas_calling_convention, TYPE_CALLING_CONVENTION Tom Tromey
2012-02-15 16:09 ` [PATCH] [SH] Prologue skipping if there is none Kevin Buettner
2012-02-16  0:13   ` Kevin Buettner
2012-02-16 16:59     ` Thomas Schwinge
2012-02-17  2:30       ` Kevin Buettner
2012-02-20 16:19         ` Thomas Schwinge
2012-02-21  5:25           ` Kevin Buettner
2012-02-24 11:09             ` Thomas Schwinge
2012-02-24 22:21               ` Kevin Buettner
2012-02-29 13:51                 ` Thomas Schwinge
2012-03-01  0:13                   ` Kevin Buettner
2012-03-01  9:03                     ` Thomas Schwinge
2012-03-01  9:00                   ` Thomas Schwinge
2012-03-02  0:19                     ` Kevin Buettner
2012-03-02 11:18                       ` Thomas Schwinge
2012-03-02 12:01                         ` Pedro Alves
2012-03-02 14:15                           ` Thomas Schwinge
2012-03-06 19:08                             ` Pedro Alves
2012-03-03  1:18                         ` Kevin Buettner
2012-03-05 15:16                           ` Thomas Schwinge
2012-03-05 19:40                             ` Kevin Buettner
2012-02-21 15:23         ` Thomas Schwinge
2012-02-22 14:54         ` Simulator testing for sh and sh64 (was: [PATCH] [SH] Prologue skipping if there is none) Thomas Schwinge
2012-02-22 16:56           ` Kevin Buettner
2012-02-22 19:33             ` Simulator testing for sh and sh64 Thomas Schwinge
2012-02-23  0:35               ` Kaz Kojima
2012-02-24 21:38                 ` Thomas Schwinge
2012-02-23 19:55               ` Thomas Schwinge [this message]
2012-02-23 22:53                 ` Kevin Buettner
2012-02-24 11:12                   ` Thomas Schwinge
2012-02-23 23:57                 ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obsp8h41.fsf@schwinge.name \
    --to=thomas@codesourcery.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=kkojima@rr.iij4u.or.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox