This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 08/12] Refactor clone_all_breakpoints


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]