public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Strange behavior of sigstep-threads.exp?
@ 2012-11-08 15:51 Andreas Arnez
  2012-11-12 16:38 ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Arnez @ 2012-11-08 15:51 UTC (permalink / raw)
  To: jan.kratochvil, Pedro Alves; +Cc: gdb

On x86-64 with upstream GDB, I'm observing what I consider strange
behavior of the sigstep-threads.exp test case.

Here's an excerpt from the log file:

  32        var++;                /* step-1 */
  (gdb) disable $step1
  (gdb) step

  Program received signal SIGUSR1, User defined signal 1.

  Program received signal SIGUSR1, User defined signal 1.

  Program received signal SIGUSR1, User defined signal 1.

  Program received signal SIGUSR1, User defined signal 1.
  33        tgkill (getpid (), gettid (), SIGUSR1);       /* step-2 */

It seems that running from step-1 to step-2 produced four SIGUSR1.  And
in total ca. 3 times as many signals are encountered than we pass
tgkill()'s:

  $ grep tgkill gdb.log | wc
      100    1000    5900
  $ grep 'Program received signal SIGUSR1' gdb.log | wc
      310    2480   17670

From the code I wouldn't expect that.  Is this a known bug or expected
behavior?  Note that the test case doesn't fail, since it doesn't care
about the number of incoming signals.

On s390x the test case actually fails sometimes.  In those cases, when
stepping from step-1 to step-2, a ton of SIGUSR1 are indicated, and then
the inferior seems to stop at the closing brace of the handler()
function instead of the tgkill().

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-21 19:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-08 15:51 Strange behavior of sigstep-threads.exp? Andreas Arnez
2012-11-12 16:38 ` Pedro Alves
2012-11-13 15:21   ` Andreas Arnez
2012-11-14 16:15     ` Pedro Alves
2012-11-21 18:47       ` Andreas Arnez
2012-11-21 19:19         ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).