From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26791 invoked by alias); 13 May 2005 13:43:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26551 invoked from network); 13 May 2005 13:42:52 -0000 Received: from unknown (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org with SMTP; 13 May 2005 13:42:52 -0000 Received: from zaretski (IGLD-83-130-254-105.inter.net.il [83.130.254.105]) by romy.inter.net.il (MOS 3.5.6-GR) with ESMTP id BFF04590 (AUTH halo1); Fri, 13 May 2005 16:41:18 +0300 (IDT) Date: Fri, 13 May 2005 15:18:00 -0000 From: "Eli Zaretskii" To: Mark Mitchell Message-ID: <01c557c1$Blat.v2.4$092ee4e0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: bug-readline@gnu.org, gdb-patches@sources.redhat.com In-reply-to: <42844946.4090202@codesourcery.com> (message from Mark Mitchell on Thu, 12 May 2005 23:29:26 -0700) Subject: Re: PATCH: Use getche on Win32 Reply-to: Eli Zaretskii References: <200505092015.j49KFoPw028903@sethra.codesourcery.com> <01c55512$Blat.v2.4$85bf3480@zahav.net.il> <42804E09.9060508@codesourcery.com> <01c55598$Blat.v2.4$baecd3c0@zahav.net.il> <428113E4.9090807@codesourcery.com> <01c5559e$Blat.v2.4$1b76ee60@zahav.net.il> <20050510203127.GA10559@nevyn.them.org> <4281AC36.7080100@codesourcery.com> <01c555fd$Blat.v2.4$f4d65060@zahav.net.il> <42844946.4090202@codesourcery.com> X-SW-Source: 2005-05/txt/msg00326.txt.bz2 > Date: Thu, 12 May 2005 23:29:26 -0700 > From: Mark Mitchell > 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.