public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: K <cq.personal@gmail.com>
To: gdb@sourceware.org
Subject: Problem sending program a signal on hitting breakpoint - an anomaly?
Date: Fri, 28 Jul 2023 10:47:41 +0200	[thread overview]
Message-ID: <CACTzTFAJjfKk2dKwbMvVPKiTYzq8QLfC4rkWnSHrbwsfBtQeZA@mail.gmail.com> (raw)

I've being trying to run commands that will deliver a signal to the inferior
upon a breakpoint hit:

b <func>
> Breakpoint 1, <func>
commands 1
signal SIGSYS
end

unfortunately rather than deliver the signal this triggers the breakpoint again
and so loops.
is this to be expected or an unfortunate 'feature'?
my understanding is that 'signal' is a resumption-invoking command like
cont, step et al, and that the breakpoint will be executed and stepped over.
which if true means gdb is reacting to this signal rather than just
delivering it
as advertised.
is there a workaround for this?

thanks for reading.

             reply	other threads:[~2023-07-28  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  8:47 K [this message]
2023-07-28 10:11 K
2023-07-28 14:50 ` K

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=CACTzTFAJjfKk2dKwbMvVPKiTYzq8QLfC4rkWnSHrbwsfBtQeZA@mail.gmail.com \
    --to=cq.personal@gmail.com \
    --cc=gdb@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).