From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3457 invoked by alias); 13 May 2005 06:29:38 -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 3425 invoked from network); 13 May 2005 06:29:35 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 13 May 2005 06:29:35 -0000 Received: (qmail 28759 invoked from network); 13 May 2005 06:29:34 -0000 Received: from localhost (HELO ?192.168.0.5?) (mitchell@127.0.0.1) by mail.codesourcery.com with SMTP; 13 May 2005 06:29:34 -0000 Message-ID: <42844946.4090202@codesourcery.com> Date: Fri, 13 May 2005 11:42:00 -0000 From: Mark Mitchell User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Eli Zaretskii CC: drow@false.org, bug-readline@gnu.org, gdb-patches@sources.redhat.com Subject: Re: PATCH: Use getche on Win32 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> In-Reply-To: <01c555fd$Blat.v2.4$f4d65060@zahav.net.il> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00320.txt.bz2 Eli Zaretskii wrote: >>Date: Tue, 10 May 2005 23:54:46 -0700 >>From: Mark Mitchell >>CC: Eli Zaretskii , bug-readline@gnu.org, >> gdb-patches@sources.redhat.com >> >>As Daniel says, the Ctrl-C issue is independent of this code, and, as >>Chris says, it's perfectly possible to capture Ctrl-C under Windows; we >>just don't want to do it here. > > > In the last sentence, what does ``here'' mean? Do you mean you don't > want to do it in Readline? If so, I think it's a mistake: the Unix > code of Readline clearly does manipulate signals, and I think a > Windows port should be as close to it as it can. You are of course correct that readline manipulates signals. In particular, it registers signal handlers at the start of the function named readline, and then removes them before returning. It would indeed be desirable that the Windows version behave as much like POSIX as possible in this respect. 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. 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. 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. Thanks, -- Mark Mitchell CodeSourcery, LLC mark@codesourcery.com (916) 791-8304