On 02/13/13 19:03, Pedro Alves wrote: > On 02/13/2013 06:56 PM, Yufeng Zhang wrote: >> On 02/13/13 16:01, Pedro Alves wrote: >>> On 02/13/2013 03:21 PM, Marcus Shawcroft wrote: >>>>> I'll send you an aarch64 version of this patch, unless you've >>>>> already started porting the necessary bits over. >>>> >>>> We were just about to get started... but if you have a patch in hand >>>> that would be great! >>> >>> Here it is. Completely untested, of course. But hopefully not >>> too far off. >> >> Not far off at all; thanks! I have tested your patch and made some further changes; please find the attached patch. The two patches together seem to be working. > > Those changes look fine. Please merge them, and go ahead > post/commit the resulting patch. > Thanks. The attached is the merged patch. I'll commit it in a couple of hours if no more comment is received. Thanks, Yufeng 2013-02-14 Pedro Alves Yufeng Zhang * aarch64-linux-nat.c (aarch64_init_debug_reg_state): Delete. (aarch64_inferior_data, struct aarch64_inferior_data): Delete. (struct aarch64_process_info): New. (aarch64_process_list): New global. (aarch64_find_process_pid, aarch64_add_process) (aarch64_process_info_get): New functions. (aarch64_inferior_data_get): Delete. (aarch64_process_info_get): New function. (aarch64_forget_process): New function. (aarch64_get_debug_reg_state): New parameter 'pid'. Reimplement. (aarch64_linux_prepare_to_resume): Pass the lwp's pid to aarch64_get_debug_reg_state. (aarch64_notify_debug_reg_change): Use iterate_over_lwps instead of linux_nat_iterate_watchpoint_lwps. (aarch64_linux_new_fork): New function. (aarch64_linux_child_post_startup_inferior): Use aarch64_forget_process instead of aarch64_init_debug_reg_state. (aarch64_handle_breakpoint, aarch64_linux_insert_hw_breakpoint) (aarch64_linux_remove_hw_breakpoint) (aarch64_handle_aligned_watchpoint) (aarch64_handle_unaligned_watchpoint) (aarch64_linux_insert_watchpoint) (aarch64_linux_remove_watchpoint) (aarch64_linux_stopped_data_address): Adjust to pass the current process id to aarch64_debug_reg_state. (_initialize_aarch64_linux_nat): Install aarch64_linux_new_fork as linux_nat_new_fork hook, and aarch64_forget_process as linux_nat_forget_process hook; remove the call to register_inferior_data_with_cleanup.