From: John Cortell <rat042@freescale.com>
To: Pedro Alves <pedro@codesourcery.com>, gdb@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: Re: sending CTRL-C to Cygwin gdb 6.8 has no effect
Date: Sat, 24 Apr 2010 01:58:00 -0000 [thread overview]
Message-ID: <201004240205.o3O25jIi000733@az33smr01.freescale.net> (raw)
In-Reply-To: <201004240209.55478.pedro@codesourcery.com>
At 08:09 PM 4/23/2010, Pedro Alves wrote:
>On Friday 23 April 2010 21:25:10, John Cortell wrote:
> > cmdline? I.e., if the user hitting CTRL-C in a Windows shell gdb
> > session successfully interrupts the target program, why is sending
> > the CTRL-C programatically not working? Any thoughts there?
>
>In the latter case, is GDB sharing a console with the inferior?
>If not sharing a console (native debugging, that is), newer GDB's
>that postdate that patch Joel pointed you at, will catch the
>CTRL_C_EVENT themselves, and still try to interrupt the inferior
>with DebugBreakProcess. Older GDB's, like 6.8, do nothing.
I'm not sure I explained myself correctly. When I said sending CTRL-C
programatically is not working, I meant, we're sending *gdb* the
CTRL-C and that's not working; it has no effect. The expected
behavior is that the inferior get interrupted and gdb takes control.
Based on your comment, I believe you think we're sending the CTRL-C
to the inferior. We do that as a fallback, and that does indeed work,
but it's not an ideal solution. If nothing, we end up having to
special case for cygwin 6.8, which is messy.
So, back to my question. If I'm able to manually do a CTRL-C within a
cygwin 6.8 gdb session running in a Windows command shell, and it
works, why doesn't it work when we (CDT) programatically send the gdb
process we launched the CTRL-C. That's the mystery at hand. I suspect
if we get an answer to that, it may help us address a range of issues
related to interrupting gdb on Windows.
>With remote debugging, I think sending a ctrl-c to
>GDB should work, even in 6.8 (provided there's a console
>and GDB does get the CTRL_C_EVENT, or if this is a cygwin gdb,
>you sent it a real SIGINT signal). Did you try it?
>
>--
>Pedro Alves
next prev parent reply other threads:[~2010-04-24 1:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 19:33 John Cortell
2010-04-23 19:44 ` Joel Brobecker
2010-04-23 19:57 ` John Cortell
2010-04-23 20:11 ` Joel Brobecker
2010-04-23 20:27 ` John Cortell
2010-04-24 1:10 ` Pedro Alves
2010-04-24 1:58 ` John Cortell [this message]
2010-04-24 2:13 ` Pedro Alves
2010-04-24 22:30 ` John Cortell
2010-04-24 23:56 ` Dave Korn
2010-04-25 14:10 ` John Cortell
2010-04-25 21:25 ` Pedro Alves
2010-04-26 6:22 ` Christopher Faylor
2010-04-26 11:38 ` Pierre Muller
2010-04-26 14:30 ` Christopher Faylor
[not found] ` <201004261330.o3QDUfph028936@az33smr01.freescale.net>
2010-04-26 13:37 ` Pedro Alves
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=201004240205.o3O25jIi000733@az33smr01.freescale.net \
--to=rat042@freescale.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=pedro@codesourcery.com \
/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