This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange behavior of sigstep-threads.exp?


Pedro Alves <palves@redhat.com> writes:

> linux-nat.c always gives preference to a SIGTRAP over other signals,
> so it's unexpected that a trap could be lost.  Maybe while GDB goes
> about stopping all threads with SIGSTOP (in effect, only the
> single-stepped thread), the single step has actually completed, but
> the kernel manages to report the SIGSTOP first, for some bizarre
> reason?  IOW, the kernel loses the trap.

Right, the kernel loses the trap.

While processing the SIGUSR1 from thread #2, GDB stops all other threads
with SIGSTOP -- in this case the single-stepped thread #1.  Now if the
SIGSTOP is sent after thread #1 has received the single-step exception,
but before the kernel has decided what signals to present, the kernel
suppresses the SIGTRAP and just delivers the SIGSTOP instead.

Discussed this with the s390 kernel maintainer.  A kernel patch is on
the way.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]