This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Strange behavior of sigstep-threads.exp?
On 11/21/2012 06:46 PM, Andreas Arnez wrote:
> 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.
Great (that GDB isn't at fault). :-)
> 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.
Thanks.
--
Pedro Alves