require '_h2ph_pre.ph';

no warnings qw(redefine misc);

require 'arm/cdefs.ph';
eval 'sub GDB_BREAKPOINT () {0xe6000011;}' unless defined(&GDB_BREAKPOINT);
eval 'sub IPKDB_BREAKPOINT_DEAD () {0xe6000010;}' unless defined(&IPKDB_BREAKPOINT_DEAD);
eval 'sub GDB5_BREAKPOINT () {0xe7ffdefe;}' unless defined(&GDB5_BREAKPOINT);
eval 'sub GDB_THUMB_BREAKPOINT () {0xdefe;}' unless defined(&GDB_THUMB_BREAKPOINT);
eval 'sub KERNEL_BREAKPOINT () {0xe7ffffff;}' unless defined(&KERNEL_BREAKPOINT);
eval 'sub DTRACE_BREAKPOINT () {0xe7fffef0;}' unless defined(&DTRACE_BREAKPOINT);
eval 'sub DTRACE_BREAKPOINT_MASK () {0xfffffff0;}' unless defined(&DTRACE_BREAKPOINT_MASK);
eval 'sub DTRACE_IS_BREAKPOINT {
    my($insn) = @_;
	eval q((($insn &  &DTRACE_BREAKPOINT_MASK) ==  &DTRACE_BREAKPOINT));
}' unless defined(&DTRACE_IS_BREAKPOINT);
if(defined(&_ARM_ARCH_BE8)) {
    eval 'sub KBPT_ASM () {".word 0xfedeffe7";}' unless defined(&KBPT_ASM);
} else {
    eval 'sub KBPT_ASM () {".word 0xe7ffdefe";}' unless defined(&KBPT_ASM);
}
eval 'sub USER_BREAKPOINT () { &GDB_BREAKPOINT;}' unless defined(&USER_BREAKPOINT);
1;
