This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 08/12] Refactor clone_all_breakpoints
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Mon, 13 Jun 2016 16:14:09 +0100
- Subject: Re: [PATCH 08/12] Refactor clone_all_breakpoints
- Authentication-results: sourceware.org; auth=none
- References: <1464859846-15619-1-git-send-email-yao dot qi at linaro dot org> <1464859846-15619-9-git-send-email-yao dot qi at linaro dot org>
On 06/02/2016 10:30 AM, Yao Qi wrote:
> V2: pass parent thread instead of parent process to
> clone_all_breakpoints,
Thanks.
>
> -/* Create a new breakpoint list NEW_LIST that is a copy of the
> - list starting at SRC_LIST. Create the corresponding new
> - raw_breakpoint list NEW_RAW_LIST as well. */
> +/* See mem-break.h. */
>
> void
> -clone_all_breakpoints (struct breakpoint **new_list,
> - struct raw_breakpoint **new_raw_list,
> - const struct breakpoint *src_list)
> +clone_all_breakpoints (struct thread_info *child_thread,
> + struct thread_info *parent_thread)
Something that I failed to notice on v1:
Can you make parent_thread be const, like src_list was?
That helps make the src vs dest more obvious.
I think you'd just need to make get_thread_process take a
const pointer, which should be a two line change.
Otherwise looks good.
Thanks,
Pedro Alves