From: Andrew Cagney <cagney@gnu.org>
To: Qing Zhang <qzhang@cs.utah.edu>
Cc: gdb@sources.redhat.com
Subject: Re: pausing gdb
Date: Thu, 05 Aug 2004 00:24:00 -0000 [thread overview]
Message-ID: <41117E4A.1040502@gnu.org> (raw)
In-Reply-To: <Pine.GSO.4.50L0.0408041707180.7882-100000@faith.cs.utah.edu>
> Hi,
>
> Can anyone tell me how ctrl-c is handled in gdb? More importantly how
> is gdb able to continue from a sigint.
>
> your help is much appreciated.
I'm assuming this is UNIX. Check the man pages for ptrace, and wait.
The sequence, assuming that GDB's attached to the process (aka inferior):
- GDB's blocked on wait() ; inferior process running
- user enters CNTRL-C
- kernel, instead of delivering cntrl-c to inferior process, unblocks
GDB returning a ``SIGINT'' indication for that wait() call
- GDB interacts with user
- user enters "continue"
- gdb does ptrace (continue)
- kernel resumes inferior process (signal is never delivered)
Andrew
prev parent reply other threads:[~2004-08-05 0:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 23:09 Qing Zhang
2004-08-05 0:24 ` Andrew Cagney [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=41117E4A.1040502@gnu.org \
--to=cagney@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=qzhang@cs.utah.edu \
/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