Description of problem:
In MIB template with breakpoint on the B slot ia64 generates SIGILL.
In other cases it generates normal SIGTRAP.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
0: 10 00 00 00 01 00 [MIB] nop.m 0x0
6: 00 00 00 02 00 80 nop.i 0x0
c: 99 99 01 00 break.b 0xccccc
SIGILL si_code==ILL_ILLOPC si_imm==0 si_segvflags==0 si_isr==0
GDB already expects SIGILL, just it has some bugs in that logic.
/* Note that breakpoint insns may cause SIGTRAP or SIGILL or SIGEMT, depending
on the operating system version. */
I have not checked all the other template and breakpoint possibilities really generate SIGTRAP.
Reproducible on the latest build:
This is just an issue with the ia64 hardware and/or trap handler. It probably doesn't have anything to do with the mechanics of ptrace or utrace. It needs an ia64 expert more than ptrace experts.
As I read the kernel source, that si_code,si_imm combination comes either via ia64_illegal_op_fault or via ia64_bad_break with break_num=0. I don't know enough about ia64 details to understand what situations lead to either of these paths or which of the two we could be seeing.
Reproducible exactly the same on:
OK, going to workaround it in GDB as a hardware bug, thanks.
This is a documented IA64 behavior as described by Tristan Gingold: