public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug threads/28347] FAIL: gdb.threads/signal-sigtrap.exp: sigtrap thread 1: signal SIGTRAP reaches handler
Date: Fri, 17 Sep 2021 12:05:56 +0000	[thread overview]
Message-ID: <bug-28347-4717-U04TRKO2MU@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28347-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28347

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at sourceware dot org,
                   |                            |simark at simark dot ca

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
So, what I understand that happens is:
- gdb command "signal SIGTRAP" sends the signal to the main thread using
  PTRACE_CONT
- the signal is blocked, so it becomes pending
- when the signal is unblocked, the pending signal is delivered, but because
the
  inferior is ptraced, gdb is notified, and gdb does the stop/print/pass
  processing.

This seems to contradict the documentation, which states:
...
Invoking the signal command is not the same as invoking the kill utility from
the shell. Sending a signal with kill causes GDB to decide what to do with the
signal depending on the signal handling tables (see Signals). The signal
command passes the signal directly to your program. 
...

I'm not sure whether the documentation needs to be updated, or gdb needs to be
fixed (and indeed, can be fixed).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2021-09-17 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 11:50 [Bug threads/28347] New: " vries at gcc dot gnu.org
2021-09-17 11:50 ` [Bug threads/28347] " vries at gcc dot gnu.org
2021-09-17 12:05 ` vries at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28347-4717-U04TRKO2MU@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).