On Mon, Jul 05, 2021 at 10:19:56PM +0200, Ilya Leoshkevich wrote: > On Mon, 2021-07-05 at 21:18 +0200, David Hildenbrand wrote: > > > > Looks better to me, but I'm not an expert on signals, so I cannot tell > > what si_addr is supposed to contain in that case. > > > > Thanks, I'll send a v6 then. I used rt_sigaction(2) man here: > > When SIGTRAP is delivered in response to a ptrace(2) event > (PTRACE_EVENT_foo), si_addr is not populated > > I think EXCP_DEBUG corresponds only to this case - there doesn't > seem to be a way to generate it without attaching gdb.
The s390x Linux kernel does in fact set si_addr to the address of the instruction triggering the signal for SIGTRAP, just like for SIGILL or SIGFPE. On the other hand, GDB does not rely on that (since this is not the case on other platforms, like the man page above indicates), so this looks OK to me. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain ulrich.weig...@de.ibm.com