This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB does not respond to CTRL+Z and CTRL+C
On Tue, Jun 20, 2006 at 08:18:56PM +0200, Christoph Bartoschek wrote:
>
> > Then it is likely that your program is blocking the signal. GDB
> > doesn't handle either directly; it forwards them to the program and
> > lets the OS handle delivery.
>
> I do not think that we block the signal. However, I have to check the code.
> But this does not explain why I am able to use CTRL+Z and CTRL+C as intended
> after sending SIGSTOP directly to GDB and foregrounding it again.
>
> CTRL+Z and CTRL+C are only ignored until GDB receives the first SIGSTOP via
> the kill command. If the signals are blocked, then I would expect that GDB
> behaves similarly before and after SIGSTOP.
I don't know what's going on and can't reproduce it; you'd have to
figure this out yourself, I'm afraid.
> If the signals are really blocked, how should one interrupt debugging to set
> breakpoints for example?
Try sending the program (not GDB) a SIGSTOP. Don't confuse this with
CTRL-Z; that sends SIGTSTP, which can be blocked, but SIGSTOP can not.
--
Daniel Jacobowitz
CodeSourcery