Lines Matching refs:bp_info
2515 struct ppc_hw_breakpoint *bp_info) in set_instruction_bp() argument
2528 if (bp_info->addr >= TASK_SIZE) in set_instruction_bp()
2531 if (bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) { in set_instruction_bp()
2534 if (bp_info->addr2 >= TASK_SIZE) in set_instruction_bp()
2540 child->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
2541 child->thread.debug.iac2 = bp_info->addr2; in set_instruction_bp()
2543 if (bp_info->addr_mode == in set_instruction_bp()
2551 child->thread.debug.iac3 = bp_info->addr; in set_instruction_bp()
2552 child->thread.debug.iac4 = bp_info->addr2; in set_instruction_bp()
2554 if (bp_info->addr_mode == in set_instruction_bp()
2573 child->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
2580 child->thread.debug.iac2 = bp_info->addr; in set_instruction_bp()
2585 child->thread.debug.iac3 = bp_info->addr; in set_instruction_bp()
2589 child->thread.debug.iac4 = bp_info->addr; in set_instruction_bp()
2657 static int set_dac(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) in set_dac() argument
2660 (bp_info->condition_mode >> PPC_BREAKPOINT_CONDITION_BE_SHIFT) in set_dac()
2663 bp_info->condition_mode & PPC_BREAKPOINT_CONDITION_MODE; in set_dac()
2669 if (bp_info->addr >= TASK_SIZE) in set_dac()
2674 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ) in set_dac()
2676 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE) in set_dac()
2678 child->thread.debug.dac1 = (unsigned long)bp_info->addr; in set_dac()
2682 (unsigned long)bp_info->condition_value; in set_dac()
2695 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ) in set_dac()
2697 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE) in set_dac()
2699 child->thread.debug.dac2 = (unsigned long)bp_info->addr; in set_dac()
2703 (unsigned long)bp_info->condition_value; in set_dac()
2759 struct ppc_hw_breakpoint *bp_info) in set_dac_range() argument
2761 int mode = bp_info->addr_mode & PPC_BREAKPOINT_MODE_MASK; in set_dac_range()
2764 if (bp_info->condition_mode) in set_dac_range()
2773 if (bp_info->addr >= TASK_SIZE) in set_dac_range()
2780 if (~((unsigned long)bp_info->addr2) >= TASK_SIZE) in set_dac_range()
2786 if (bp_info->addr2 >= TASK_SIZE) in set_dac_range()
2794 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ) in set_dac_range()
2796 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE) in set_dac_range()
2798 child->thread.debug.dac1 = bp_info->addr; in set_dac_range()
2799 child->thread.debug.dac2 = bp_info->addr2; in set_dac_range()
2813 struct ppc_hw_breakpoint *bp_info) in ppc_set_hwdebug() argument
2825 if (bp_info->version != 1) in ppc_set_hwdebug()
2831 if ((bp_info->trigger_type == 0) || in ppc_set_hwdebug()
2832 (bp_info->trigger_type & ~(PPC_BREAKPOINT_TRIGGER_EXECUTE | in ppc_set_hwdebug()
2834 (bp_info->addr_mode & ~PPC_BREAKPOINT_MODE_MASK) || in ppc_set_hwdebug()
2835 (bp_info->condition_mode & in ppc_set_hwdebug()
2840 if (bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE) in ppc_set_hwdebug()
2844 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_EXECUTE) { in ppc_set_hwdebug()
2845 if ((bp_info->trigger_type != PPC_BREAKPOINT_TRIGGER_EXECUTE) || in ppc_set_hwdebug()
2846 (bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE)) in ppc_set_hwdebug()
2848 return set_instruction_bp(child, bp_info); in ppc_set_hwdebug()
2850 if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_EXACT) in ppc_set_hwdebug()
2851 return set_dac(child, bp_info); in ppc_set_hwdebug()
2854 return set_dac_range(child, bp_info); in ppc_set_hwdebug()
2862 if ((bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_RW) == 0 || in ppc_set_hwdebug()
2863 (bp_info->trigger_type & ~PPC_BREAKPOINT_TRIGGER_RW) != 0 || in ppc_set_hwdebug()
2864 bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE) in ppc_set_hwdebug()
2867 if ((unsigned long)bp_info->addr >= TASK_SIZE) in ppc_set_hwdebug()
2870 brk.address = bp_info->addr & ~7UL; in ppc_set_hwdebug()
2873 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ) in ppc_set_hwdebug()
2875 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE) in ppc_set_hwdebug()
2882 if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE) in ppc_set_hwdebug()
2883 len = bp_info->addr2 - bp_info->addr; in ppc_set_hwdebug()
2884 else if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_EXACT) in ppc_set_hwdebug()
2894 attr.bp_addr = (unsigned long)bp_info->addr & ~HW_BREAKPOINT_ALIGN; in ppc_set_hwdebug()
2908 if (bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) in ppc_set_hwdebug()
3092 struct ppc_hw_breakpoint bp_info; in arch_ptrace() local
3094 if (copy_from_user(&bp_info, datavp, in arch_ptrace()
3097 return ppc_set_hwdebug(child, &bp_info); in arch_ptrace()