From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90063 invoked by alias); 17 Jun 2016 11:31:38 -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 90024 invoked by uid 89); 17 Jun 2016 11:31:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Several X-HELO: mail-pf0-f196.google.com Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 17 Jun 2016 11:31:36 +0000 Received: by mail-pf0-f196.google.com with SMTP id i123so3112237pfg.3 for ; Fri, 17 Jun 2016 04:31:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=vGhNaOf2UEFSg9zrm+934A2fCX+v13oBMktUuxQ3yiw=; b=lmaWjRsy4jQwttkcssqpOyBR0X0vVSxG0H2pdN6Wqj1Gx65GuI3IPPUOw4rynAEVsy yn3eAJwU9BNhx5UVCl80157mZ4jEbzM3dlK7QRcU8L8xhizQFiaB3HZ7gaF3hoR3ds0C Tg+O7vg74ab/GGmt/QOb6OBZlz5CBr9/EVd0aiTh4Zj595hYibgiou3AO1woHd/l4Y54 Q6UH3fEg6XUpfFG6A9sPzPqiBTMMw3CMt8qB27hUxZ1l07ZXD6dZwp/JBMDXeYe2o+mT jBsIXpoxWQ6HTwEbQgRAJ3zX0c75rehdv3tmkuv+8yNVw00BZefpuJz+HcpG6XTueIee tylg== X-Gm-Message-State: ALyK8tIIOhMU8KA2AGYk959Au4CGGVa6qQ6ldk0my+yD9lfeekfs+kew5dYdcCQzeQwcng== X-Received: by 10.98.207.132 with SMTP id b126mr1974774pfg.20.1466163095216; Fri, 17 Jun 2016 04:31:35 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id o193sm47976831pfo.12.2016.06.17.04.31.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 17 Jun 2016 04:31:34 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v4 1/3] Factor out "Detaching from program" message printing References: <1466119968-15171-1-git-send-email-palves@redhat.com> <1466119968-15171-2-git-send-email-palves@redhat.com> Date: Fri, 17 Jun 2016 11:31:00 -0000 In-Reply-To: <1466119968-15171-2-git-send-email-palves@redhat.com> (Pedro Alves's message of "Fri, 17 Jun 2016 00:32:46 +0100") Message-ID: <86shwcrr03.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00297.txt.bz2 Pedro Alves writes: > Several targets have a copy of the same code that prints > > "Detaching from program ..." > > in their target_detach implementation. Factor that out to a common > function. > > (For now, I left the couple targets that print this a bit differently > alone. Maybe this could be further pulled out into infcmd.c. If we > did that, and those targets want to continue printing differently, > this new function could be converted to a target method.) > > gdb/ChangeLog: > yyyy-mm-dd Pedro Alves > > * darwin-nat.c (darwin_detach): Use target_announce_detach. > * inf-ptrace.c (inf_ptrace_detach): Likewise. > * nto-procfs.c (procfs_detach): Likewise. > * remote.c (remote_detach_1): Likewise. > * target.c (target_announce_detach): New function. > * target.h (target_announce_detach): New declaration. Patch is good to me. --=20 Yao (=E9=BD=90=E5=B0=A7)