From patchwork Wed Mar 12 11:51:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 47 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id C0D02360060 for ; Wed, 12 Mar 2014 04:53:43 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id 6DE1F4E53C00; Wed, 12 Mar 2014 04:53:43 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 8A0D94DAF957 for ; Wed, 12 Mar 2014 04:52:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=WJJZnSs0KW/+4KZcSleELAgC2PgdsHKgBxrO8aVMmaSAc2k3TG3Yr RRtJUiSgkRSJ05MPA7arTP9Vp1G3BnumrR22CGnpAqOir8tptDYXjO1ZxlvuQlrX 7RbkOFmtxZEqOKP9/0tTMRRUjUGCd2MDWlB2Sib5zRhHVl9nqyKGnU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=e+FHSLnCHt/L5KUVWx183aBrEa0=; b=WImcM9Yok9WaQ0ZI7Om7L7gqvWEq bx62ZF24rpV9IRYFAT4EIrecJTwp53qe8H+ooDYaz48bLoc4Bj8y0QNJSiJjcRmT 9cbk3q40BMXkyLVOVvbzECqzSoeeD0O+uOTA58nWDNDjHCFKBdIZlH91X4b63KAI E17Tkbvsfa5RGT4= Received: (qmail 25785 invoked by alias); 12 Mar 2014 11:52:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 25776 invoked by uid 89); 12 Mar 2014 11:52:02 -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, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Mar 2014 11:52:01 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2CBq0cl007223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Mar 2014 07:52:00 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s2CBpxxa024895 for ; Wed, 12 Mar 2014 07:51:59 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PUSHED] inf-child.c: Update comments. Date: Wed, 12 Mar 2014 11:51:57 +0000 Message-Id: <1394625117-10939-1-git-send-email-palves@redhat.com> X-DH-Original-To: gdb@patchwork.siddhesh.in This file is no longer used exclusively by Unix targets anymore. gdb/ 2014-03-12 Pedro Alves * inf-child.c: Update top comment to not mention Unix. Add generic comment describing how this target is meant to be used. (inf_child_post_attach, inf_child_post_startup_inferior) (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention Unix in comment. --- gdb/ChangeLog | 8 ++++++++ gdb/inf-child.c | 23 +++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index abfbfd7..f8d9d05 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2014-03-12 Pedro Alves + * inf-child.c: Update top comment to not mention Unix. Add + generic comment describing how this target is meant to be used. + (inf_child_post_attach, inf_child_post_startup_inferior) + (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention + Unix in comment. + +2014-03-12 Pedro Alves + * nto-procfs.c: Include inf-child.h. (procfs_ops): Delete global. (procfs_can_run): Delete method. diff --git a/gdb/inf-child.c b/gdb/inf-child.c index fd03a9f..ee63dd1 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -1,5 +1,4 @@ -/* Default child (native) target interface, for GDB when running under - Unix. +/* Base/prototype target for default child (native) targets. Copyright (C) 1988-2014 Free Software Foundation, Inc. @@ -18,6 +17,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +/* This file provides a common base class/target that all native + target implementations extend, by calling inf_child_target to get a + new prototype target and then overriding target methods as + necessary. */ + #include "defs.h" #include "regcache.h" #include "memattr.h" @@ -89,8 +93,8 @@ inf_child_store_inferior_registers (struct target_ops *ops, static void inf_child_post_attach (struct target_ops *self, int pid) { - /* This version of Unix doesn't require a meaningful "post attach" - operation by a debugger. */ + /* This target doesn't require a meaningful "post attach" operation + by a debugger. */ } /* Get ready to modify the registers array. On machines which store @@ -114,16 +118,15 @@ inf_child_open (char *arg, int from_tty) static void inf_child_post_startup_inferior (struct target_ops *self, ptid_t ptid) { - /* This version of Unix doesn't require a meaningful "post startup - inferior" operation by a debugger. */ + /* This target doesn't require a meaningful "post startup inferior" + operation by a debugger. */ } static int inf_child_follow_fork (struct target_ops *ops, int follow_child, int detach_fork) { - /* This version of Unix doesn't support following fork or vfork - events. */ + /* This target doesn't support following fork or vfork events. */ return 0; } @@ -136,8 +139,8 @@ inf_child_can_run (struct target_ops *self) static char * inf_child_pid_to_exec_file (struct target_ops *self, int pid) { - /* This version of Unix doesn't support translation of a process ID - to the filename of the executable file. */ + /* This target doesn't support translation of a process ID to the + filename of the executable file. */ return NULL; }