This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 1/3] Factor out "Detaching from program" message printing
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 17 Jun 2016 12:31:24 +0100
- Subject: Re: [PATCH v4 1/3] Factor out "Detaching from program" message printing
- Authentication-results: sourceware.org; auth=none
- References: <1466119968-15171-1-git-send-email-palves at redhat dot com> <1466119968-15171-2-git-send-email-palves at redhat dot com>
Pedro Alves <palves@redhat.com> 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 <palves@redhat.com>
>
> * 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.
--
Yao (éå)