On Wed 23 Dec 2009 22:31:06 Thiago Jung Bauermann wrote: > Adds support for the following types of watchpoints: This version incorporates all the feedback received so far. -- []'s Thiago Jung Bauermann IBM Linux Technology Center 2009-12-31 Sergio Durigan Junior Thiago Jung Bauermann * breakpoint.c (update_watchpoint): Add variables to save/restore new fields for the new types of hardware breakpoints/watchpoints. Call target_hw_point_extra_slot_count. (insert_bp_location): Call the correct insertion method according to the type of the hardware watchpoint. (remove_breakpoint_1): Call the correct deletion method according to the type of the hardware watchpoint. (print_it_typical): Handle printing of masked watchpoints. (watchpoints_triggered): Handle the case of a hardware masked watchpoint trigger. (watchpoint_check): Handle the case of a hardware masked watchpoint trigger. (hw_watchpoint_used_count): Call target-specific function that will tell how many extra slots a hardware watchpoint needs. (mention): Mention masked watchpoints. (watch_command_1): Add a routine to check for the existence of the `mask' parameter when the user creates a watchpoint. (can_use_hardware_watchpoint): Add code to check if the memory that is going to be watched is big, i.e., it needs a hardware ranged watchpoint. (watch_range_command_1): New function. (watch_range_command): Ditto. (awatch_range_command): Ditto. (rwatch_range_command): Ditto. (_initialize_breakpoint): Register watch-range, awatch-range and rwatch-range commands. * breakpoint.h (struct bp_location) , : New fields. (hw_point_flag) , : New values. * findcmd.c (parse_addr_range): New function. (parse_find_args): Call `parse_addr_range'. * i386-nat.c (i386_region_ok_for_watchpoint): Add `is_big_blob' parameter. * spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Ditto. * ppc-linux-nat.c (ppc_linux_can_use_special_hw_point_p): Handle HW_POINT_RANGED_WATCH and HW_POINT_MASKED_WATCH cases. (ppc_linux_region_ok_for_hw_watchpoint): Add the `is_big_blob' parameter. (ppc_linux_insert_mask_watchpoint): New function. (ppc_linux_remove_mask_watchpoint): New function. (ppc_linux_insert_ranged_watchpoint): New function. (ppc_linux_remove_ranged_watchpoint): New function. (ppc_linux_hw_point_extra_slot_count): New function. (_initialize_ppc_linux_nat): Initialize to_insert_mask_watchpoint, to_remove_mask_watchpoint, to_insert_ranged_watchpoint, to_remove_ranged_watchpoint and hw_point_extra_slot_count. * target.c (default_region_ok_for_hw_watchpoint): Add `is_big_blob' parameter. (debug_to_region_ok_for_hw_watchpoint): Ditto. (update_current_target): Insert to_insert_mask_watchpoint, to_remove_mask_watchpoint, to_insert_ranged_watchpoint, to_remove_ranged_watchpoint and to_hw_point_extra_slot_count. * target.h (struct target_ops , , , and ): New callbacks. (target_region_ok_for_hw_watchpoint): Add `is_big_blob' parameter. (target_insert_mask_watchpoint): New define. (target_remove_mask_watchpoint): Ditto. (target_insert_ranged_watchpoint): New define. (target_remove_ranged_watchpoint): Ditto. (target_hw_point_extra_slot_count): Ditto. * value.h (parse_addr_range): Declare.