From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51226 invoked by alias); 10 Jun 2015 13:06:47 -0000 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 Received: (qmail 51212 invoked by uid 89); 10 Jun 2015 13:06:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: out4-smtp.messagingengine.com Received: from out4-smtp.messagingengine.com (HELO out4-smtp.messagingengine.com) (66.111.4.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 10 Jun 2015 13:06:44 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D1D01202C6 for ; Wed, 10 Jun 2015 09:06:41 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 10 Jun 2015 09:06:41 -0400 Received: from [192.168.1.102] (unknown [31.51.205.195]) by mail.messagingengine.com (Postfix) with ESMTPA id 763EFC0001F for ; Wed, 10 Jun 2015 09:06:41 -0400 (EDT) Message-ID: <55783660.7030506@dronecode.org.uk> Date: Wed, 10 Jun 2015 13:06:00 -0000 From: Jon TURNEY User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH 0/5] Fix to Cygwin-specific signal handling (v2) References: <1429009382-21040-1-git-send-email-jon.turney@dronecode.org.uk> <1429212209-20548-1-git-send-email-jon.turney@dronecode.org.uk> In-Reply-To: <1429212209-20548-1-git-send-email-jon.turney@dronecode.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00180.txt.bz2 On 16/04/2015 20:23, Jon Turney wrote: > After these patches, there still remain some problems with Cygwin-specific > signal handling, which hopefully I can address in future patches. The remaining problem appears to be that since the signal context reported by Cygwin is the context which will be resumed after any signal handler has been run, to restore it to the inferior (as master currently does) skips over the actual signal delivery and handling. Cygwin currently carries a patch which clears the ContextFlags in the signal context, so we never attempt to restore it to the inferior. The test-suite reveals that isn't quite right, either, unfortunately. In some cases, GDB decides it needs to single-step when continuing from the signal, which requires it update the inferior's context with FLAG_TRACE_BIT set, which can only currently happen when ContextFlags has the CONTEXT_CONTROL flag set. This seems to me to be not straightforward to fix. It's not entirely clear to me that Cygwin's current behaviour is correct, either.