From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13770 invoked by alias); 28 Aug 2008 18:38:18 -0000 Received: (qmail 13758 invoked by uid 22791); 28 Aug 2008 18:38:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 28 Aug 2008 18:37:43 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.64.160]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 63B2641003 for ; Thu, 28 Aug 2008 11:37:41 -0700 (PDT) Received: from [10.20.92.47] (unknown [10.20.92.47]) by mailhost2.vmware.com (Postfix) with ESMTP id 572988E5F2 for ; Thu, 28 Aug 2008 11:37:41 -0700 (PDT) Message-ID: <48B6EFBD.2090203@vmware.com> Date: Thu, 28 Aug 2008 18:38:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: RFC: Do not call write_pc for "signal SIGINT" References: <20080828155520.GA23110@caradoc.them.org> <48B6E9F4.5080403@vmware.com> <20080828181841.GA30866@caradoc.them.org> In-Reply-To: <20080828181841.GA30866@caradoc.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00654.txt.bz2 Daniel Jacobowitz wrote: > On Thu, Aug 28, 2008 at 11:09:56AM -0700, Michael Snyder wrote: >> Hmmm, kind of opaque. Your new code seems like the right >> thing to do, but I don't understand the code that you're replacing. >> >> Isn't -1 supposed to mean the same as stop_pc? > > Except that we call gdbarch_write_pc to replace the PC in this case, > and that has side effects - take a look at a Linux example. > >> And isn't signal 0 equivalent to no signal? > > Yes, that's right. > >>> This isn't the only place where Linux's internal errno codes can leak >>> back into user programs because of how we fiddle orig_eax. I'll file >>> another bug report about that. >> Now you've really lost me. What have errno codes >> got to do with this? > > Sorry, take a look at the PR (gdb/2241) for more information. When > you hit C-c during select, and then type "signal SIGINT", the program > gets errno 514 instead of EINTR. > > Yes, I know, I need a testcase... More than a testcase. This isn't very well explained. You didn't reference the PR in your original post, and I'm still not sure how we're getting from SIGINT to signal 0...