From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27795 invoked by alias); 17 Mar 2015 20:56:42 -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 27779 invoked by uid 89); 17 Mar 2015 20:56:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FROM_12LTRDOM autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Mar 2015 20:56:39 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1YXyXU-00005K-5u from Don_Breazeal@mentor.com ; Tue, 17 Mar 2015 13:56:36 -0700 Received: from build4-lucid-cs (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.224.2; Tue, 17 Mar 2015 13:56:35 -0700 Received: by build4-lucid-cs (Postfix, from userid 1905) id 5F8BB40F0F; Tue, 17 Mar 2015 13:56:34 -0700 (PDT) From: Don Breazeal To: , Subject: [PATCH v6 0/6] Remote fork events Date: Tue, 17 Mar 2015 20:56:00 -0000 Message-ID: <1426625788-4469-1-git-send-email-donb@codesourcery.com> In-Reply-To: <1424997977-13316-1-git-send-email-donb@codesourcery.com> References: <1424997977-13316-1-git-send-email-donb@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00503.txt.bz2 This is an update to the patch series implementing remote follow-fork. This update only implements fork and vfork events for extended remote, omitting exec events and 'target remote' for now. Changes from the previous version are relatively few: * In patch 6, in the case of a 'kill' operation on a fork parent before follow_fork has been completed, implement killing the fork child on the host side instead of in gdbserver, and don't implement get_last_target_status in gdbserver. In particular this fixes failures seen in gdb.base/disp-step-syscall.exp in previous versions of the patchset. * Eliminate a redundant assignment in gdbserver/linux-low.c:handle_extended_wait * Merge changes from mainline The new series includes six patches as follows: 1/6: Preparatory patch that implements qSupported support for fork events and associated mechanisms. 2/6: Implements functions to clone breakpoint lists in gdbserver. 3/6: Implements follow fork for 'fork' but not 'vfork', for extended-remote targets only. 4/6: Adds the architecture-specific pieces of follow-fork that allows hardware watchpoints to be inherited by a forked child. This patch was previously approved, although I have added a trivial change to gdb/NEWS in this patch. 5/6: Adds follow fork for 'vfork'. 6/6: Adds catchpoints for 'fork' and 'vfork', along with support for killing a process that has forked before follow_fork is completed. TESTING: Testing was mostly done using x86_64 Ubuntu, with the exception of the architecture-specific patch, #4. There are a few anomalies that show up, but don't signify any problem. - Intermediate patches show failures due to the lack of features implemented in subsequent patches, like missing hardware watchpoint or catchpoint support. - Some vfork tests fail due to the lack of exec event support. - There are a couple of tests that show new failures that actually fail in the current mainline. Details of these are as follows: * Once vfork events are enabled, gdb.base/watch-vfork.exp shows PASS => FAIL in .sum diffs. This test always fails. With native/master, we see this: continue^M Continuing.^M FAIL: gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (timeout) With extended-remote/master, we see this: continue Continuing. [Inferior 1 (process 18866) exited normally] (gdb) FAIL: gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (the program exited) But once vfork events are enabled, we see: continue Continuing. Detaching from process 17405 FAIL: gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (timeout) which more-or-less matches the native/master behavior. Thanks, --Don