This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Use getche on Win32


> Date: Thu, 12 May 2005 23:29:26 -0700
> From: Mark Mitchell <mark@codesourcery.com>
> CC: drow@false.org,  bug-readline@gnu.org, 
>  gdb-patches@sources.redhat.com
> 
> However, when you said earlier that handling Ctrl-C was very important 
> to GDB, Daniel and I understood you to be referring to the ability to 
> interrupt the inferior when readline is not active.  In other words, 
> after you say "run", you may want to hit Ctrl-C before you reach a 
> breakpoint.  That functionality is independent of readline; it comes 
> from signal handlers that GDB itself installs.

True.  But please note that setting the terminal in Readline so that
it reads individual characters and gets SIGINT when you press is
imperative to make sure SIGINT is delivered to GDB, even when you are
not inside Readline code.  So these two issues are not completely
independent; in particular, once you find a way to get SIGINT into
Readline, you will have found a way to get SIGINT into GDB's signal
handlers as well.

> So, what I wrote is way too strong a statement.  I should have just said 
> that handling Ctrl-C here is not as critical as elsewhere.

Agreed.

> I also can't find any suggestion that readline actually reads the
> "Ctrl" and "C" characters through its main input loop; instead, I
> think that it just installs signal handlers in the usual way.  It's
> possible that I've just not find the right bit yet, though.

If you mean on Posix platforms, then yes: Ctrl-C never gets to the
program, because the signal-generation machinery acts on it first.

If you mean Windows, do you mean to say that the signal handler is
installed, but never invoked?  I'm not sure I understand what is that
``right bit'' that you are looking for.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]