Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix linux-ia64 on SIGILL for deleted breakpoint
Date: Mon, 19 Jul 2010 09:20:00 -0000	[thread overview]
Message-ID: <20100719091956.GA25899@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <00CE116D-04D6-477D-9D71-0EBAD7017283@adacore.com>

On Mon, 19 Jul 2010 11:04:26 +0200, Tristan Gingold wrote:
> On Jul 19, 2010, at 10:58 AM, Jan Kratochvil wrote:
> > in some cases ia64 can generate SIGILL instead of SIGTRAP.  Guessing it is
> > a CPU bug instead of Linux kernel bug (but I may be wrong).
> > 	https://bugzilla.redhat.com/show_bug.cgi?id=615538
> > 	http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/ia64-sigill.c?cvsroot=systemtap
> 
> This is not a bug but a feature: the immediate of break.b is ignored by the processor.

You are right, Intel IA64 manual says:
	For the b_unit_form, imm21 is ignored and the value zero is placed in
	the Interruption Immediate control register (IIM).

And kernel/arch/ia64/kernel/traps.c ia64_bad_break():
              case 0: /* unknown error (used by GCC for __builtin_abort()) */
		[...]
                sig = SIGILL; code = ILL_ILLOPC;

And it really reports SIGILL even for example for:
...0:       10 00 00 00 01 00       [MIB]       nop.m 0x0
...6:       00 00 00 00 00 00                   break.i 0x0
...c:       00 00 00 20                         nop.b 0x0

Thanks for the explanation (embarassingly I did read the IA64 manual first).

(The GDB patch part meaning has not changed by this mail.)


Jan


  reply	other threads:[~2010-07-19  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19  8:58 Jan Kratochvil
2010-07-19  9:04 ` Tristan Gingold
2010-07-19  9:20   ` Jan Kratochvil [this message]
2010-07-19  9:50     ` Tristan Gingold
2010-07-20 13:29 ` Pedro Alves
2010-07-23 22:19   ` Jan Kratochvil
2010-07-24 22:26     ` Pedro Alves
2010-07-25 18:52       ` Jan Kratochvil
2010-07-25 18:55         ` [patch] Fix linux-ia64 on SIGILL for deleted breakpoint [cleanup] Jan Kratochvil
2010-07-27 11:59           ` Pedro Alves
2010-07-27 21:22             ` Jan Kratochvil
2010-07-27 11:43         ` [patch] Fix linux-ia64 on SIGILL for deleted breakpoint Pedro Alves
2010-07-27 20:55           ` Jan Kratochvil

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=20100719091956.GA25899@host1.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gingold@adacore.com \
    /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