This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix linux-ia64 on SIGILL for deleted breakpoint
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