[PATCH 2/2] Support the new PPC476 processor -- Arch Dependent

Sérgio Durigan Júnior sergiodj@linux.vnet.ibm.com
Wed Dec 16 20:49:00 GMT 2009


Hi,

This is the patch that implements the architecture-dependent (specific) logic 
for PowerPC, which will handle the creation/deletion of the new (and old) 
types of hardware breakpoints/watchpoints.  It also defines a bunch of new 
methods in the target_ops, so that other archs can implement them in the 
future.

Regards,

-- 
Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC
IBM Brazil

gdb/ChangeLog:

2009-16-12  Sergio Durigan Junior  <sergiodj@linux.vnet.ibm.com>

	* i386-nat.c (i386_region_ok_for_watchpoint): Adding `is_big_blob'
	parameter.

	* spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Ditto.

	* ppc-linux-nat.c: Including `breakpoint.h'.
	(have_ptrace_new_debug_booke): New flag.
	(booke_debug_info): New variable.
	(max_slots_number): Ditto.
	(struct thread_points): New struct.
	(ppc_threads): New variable.
	(PPC_DEBUG_CURRENT_VERSION): New define.
	(ppc_linux_can_use_hw_breakpoint): Handling BookE processors.
	(ppc_linux_can_use_special_hw_point_p): New function.
	(ppc_linux_region_ok_for_hw_watchpoint): Adding the `is_big_blob'
	parameter.  Handling BookE processors.
	(booke_alloc_thread_points): New function.
	(booke_cmp_hw_point): Ditto.
	(booke_select_vector): Ditto.
	(booke_find_thread_points_by_tid): Ditto.
	(booke_find_thread_points_slot): Ditto.
	(booke_insert_point): Ditto.
	(booke_remove_point): Ditto.
	(booke_linux_insert_normal_hw_breakpoint): Ditto.
	(booke_linux_remove_normal_hw_breakpoint): Ditto.
	(booke_linux_insert_ranged_hw_breakpoint): Ditto.
	(booke_linux_remove_ranged_hw_breakpoint): Ditto.
	(booke_linux_insert_hw_breakpoint): Ditto.
	(booke_linux_remove_hw_breakpoint): Ditto.
	(ppc_linux_insert_hw_breakpoint): Ditto.
	(ppc_linux_remove_hw_breakpoint): Ditto.
	(HW_WATCH_RW_TRIGGER): New define.
	(booke_linux_insert_normal_watchpoint): New function.
	(booke_linux_remove_normal_watchpoint): Ditto.
	(booke_linux_insert_ranged_watchpoint): Ditto.
	(booke_linux_remove_ranged_watchpoint): Ditto.
	(booke_linux_insert_watchpoint): Ditto.
	(booke_linux_remove_watchpoint): Ditto.
	(booke_linux_insert_mask_watchpoint): Ditto.
	(booke_linux_remove_mask_watchpoint): Ditto.
	(booke_linux_fill_cond_mode): Ditto.
	(booke_linux_insert_cond_accel_watchpoint): Ditto.
	(booke_linux_remove_cond_accel_watchpoint): Ditto.
	(ppc_insert_watchpoint): Ditto.
	(ppc_remove_watchpoint): Ditto.
	(ppc_linux_insert_watchpoint): Handling BookE processors.
	(ppc_linux_remove_watchpoint): Handling BookE processors.
	(ppc_linux_insert_mask_watchpoint): New function.
	(ppc_linux_remove_mask_watchpoint): Ditto.
	(ppc_linux_insert_cond_accel_watchpoint): Ditto.
	(ppc_linux_remove_cond_accel_watchpoint): Ditto.
	(ppc_linux_new_thread): Handling non-BookE processors.
	(ppc_linux_stopped_data_address): Handling BookE processors.
	(ppc_linux_watchpoint_addr_within_range): Handling BookE processors
	with and without the new kernel interface.
	(booke_linux_get_watchpoint_cond_accel_addr): New function.
	(ppc_linux_get_watchpoint_cond_accel_addr): Ditto.
	(booke_linux_can_use_watchpoint_cond_accel_p): Ditto.
	(ppc_linux_can_use_watchpoint_cond_accel_p): Ditto.
	(ppc_linux_hw_point_extra_slot_count): Ditto.
	(ppc_linux_read_description): Querying the target to know if it
	supports the new kernel BookE interface.
	(_initialize_ppc_linux_nat): Initializing fields of the target
	operations.

	* target.c (default_region_ok_for_hw_watchpoint): Added `is_big_blob'
	parameter.
	(debug_to_region_ok_for_hw_watchpoint): Ditto.
	(update_current_target): Inserting the new methods.

	* target.h (struct target_ops <to_can_use_special_hw_point_p>,
	<to_can_use_watchpoint_cond_accel_p>, <to_insert_mask_watchpoint>,
	<to_remove_mask_watchpoint>, <to_insert_cond_accel_watchpoint>,
	<to_remove_cond_accel_watchpoint>,
	<to_get_watchpoint_cond_accel_addr>,
	<to_hw_point_extra_slot_count>): New callbacks.
	(TARGET_CAN_USE_SPECIAL_HW_POINT_P): New define.
	(TARGET_CAN_USE_WATCHPOINT_COND_ACCEL_P): Ditto.
	(TARGET_GET_WATCHPOINT_COND_ACCEL_ADDR): Ditto.
	(target_insert_mask_watchpoint): Ditto.
	(target_remove_mask_watchpoint): Ditto.
	(target_insert_cond_accel_watchpoint): Ditto.
	(target_remove_cond_accel_watchpoint): Ditto.
	(target_hw_point_extra_slot_count): Ditto.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc476-arch-dep.patch
Type: text/x-patch
Size: 43496 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20091216/8f28a715/attachment.bin>


More information about the Gdb-patches mailing list