public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* pausing gdb
@ 2004-08-04 23:09 Qing Zhang
  2004-08-05  0:24 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Qing Zhang @ 2004-08-04 23:09 UTC (permalink / raw)
  To: gdb

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.

-Christene

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

* Re: pausing gdb
  2004-08-04 23:09 pausing gdb Qing Zhang
@ 2004-08-05  0:24 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2004-08-05  0:24 UTC (permalink / raw)
  To: Qing Zhang; +Cc: gdb

> 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


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

end of thread, other threads:[~2004-08-05  0:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-04 23:09 pausing gdb Qing Zhang
2004-08-05  0:24 ` Andrew Cagney

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).