Re: GDB (not) handling SIGINT...?

Paul Smith <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Thu, 2018-11-15 at 16:24 +0000, Pedro Alves wrote:
> With current GDB, you can work around this by attaching in non-stop
> mode ("set non-stop on"), and then using "continue&" to continue in
> the background, and the "interrupt" command to interrupt.

Tricksy!

> If you're OK with hacking GDB, s/SIGINT/SIGSTOP/g in child_pass_ctrlc
> should work reasonably OK, even though not perfect.

Oh, I understand now.  The SIGINT is passed to the child to get it to
stop.  Somehow I assumed that there was a magical ptrace way to do
this, rather than having to send normal signals.

I guess there is now: using PTRACE_SEIZE instead of PTRACE_ATTACH,
which will allow you to later send PTRACE_INTERRUPT: presumably if this
were used would solve the problem for attached processes anyway...?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.