From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5208 invoked by alias); 21 Aug 2014 00:34:55 -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 5192 invoked by uid 89); 21 Aug 2014 00:34:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 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; Thu, 21 Aug 2014 00:34:53 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XKGL4-0001gp-48 from donb@codesourcery.com for gdb-patches@sourceware.org; Wed, 20 Aug 2014 17:34:50 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 20 Aug 2014 17:34:49 -0700 Received: from build4-lucid-cs (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Wed, 20 Aug 2014 17:34:49 -0700 Received: by build4-lucid-cs (Postfix, from userid 1905) id D497740D74; Wed, 20 Aug 2014 17:34:48 -0700 (PDT) From: Don Breazeal To: Subject: [PATCH 13/16 v2] Extended-remote exec catchpoints Date: Thu, 21 Aug 2014 00:34:00 -0000 Message-ID: <1408580964-27916-14-git-send-email-donb@codesourcery.com> In-Reply-To: <1407434395-19089-1-git-send-email-donb@codesourcery.com> References: <1407434395-19089-1-git-send-email-donb@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00449.txt.bz2 This patch implements exec catchpoints for extended-remote Linux targets. The implementation follows the same appraoch used in patch 9 of this series for fork catchpoints, implementing extended_remote target routines for insert/remove. Existing host-side code and the support for exec events introduced in patch 12 of this series takes care of the rest. Tested native, remote, extended-remote on x64 Ubuntu. Thanks --Don gdb/ 2014-08-20 Don Breazeal * remote.c (extended_remote_insert_exec_catchpoint): New function. (extended_remote_remove_exec_catchpoint): New function. (_initialize_remote): Initialize target vector with new exec catchpoint functions. --- gdb/remote.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index d2256fd..60297ca 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7938,6 +7938,24 @@ extended_remote_follow_fork (struct target_ops *ops, int follow_child, return 0; } +/* Insert exec catchpoint target routine. If exec events are + enabled, just return success. */ + +static int +extended_remote_insert_exec_catchpoint (struct target_ops *ops, int pid) +{ + return !extended_remote_feature_supported (EXEC_EVENT); +} + +/* Remove exec catchpoint target routine. Nothing to do, just + return success. */ + +static int +extended_remote_remove_exec_catchpoint (struct target_ops *ops, int pid) +{ + return 0; +} + static void remote_mourn (struct target_ops *ops) { @@ -11783,6 +11801,10 @@ Specify the serial device it is connected to (e.g. /dev/ttya)."; extended_remote_ops.to_remove_vfork_catchpoint = extended_remote_remove_vfork_catchpoint; extended_remote_ops.to_follow_fork = extended_remote_follow_fork; + extended_remote_ops.to_insert_exec_catchpoint + = extended_remote_insert_exec_catchpoint; + extended_remote_ops.to_remove_exec_catchpoint + = extended_remote_remove_exec_catchpoint; extended_remote_ops.to_mourn_inferior = extended_remote_mourn; extended_remote_ops.to_detach = extended_remote_detach; extended_remote_ops.to_attach = extended_remote_attach; -- 1.7.0.4