//-------------------------------------------------------------------------- // Set hardware breakpoint for one thread bool wince_debmod_t::set_hwbpts(HANDLE hThread) { if ( is_xscale ) { uint32 d0 = databpts[0] == BADADDR ? 0 : s0tops(databpts[0]); uint32 d1 = databpts[1] == BADADDR ? 0 : s0tops(databpts[1]); uint32 c0 = codebpts[0] == BADADDR ? 0 : s0tops(codebpts[0] | 1); uint32 c1 = codebpts[1] == BADADDR ? 0 : s0tops(codebpts[1] | 1); if ( active_hwbpts() ) { SetDebugControlAndStatus(DEF_GlobalDebugEnabled, DEF_GlobalDebugEnabled); SetDataBreakPoint(d0, d1, dbcon); SetCodeBreakPoint(c0, c1); } else { disable_hwbpts(); } // msg("set bpts: dcsr=%x code=%a %a data=%a %a dbcon=%a\n", // SetDebugControlAndStatus(0, 0), // c0, c1, d0, d1, dbcon); return true; } return false; }
//-------------------------------------------------------------------------- void arm_debmod_t::cleanup_hwbpts() { databpts[0] = BADADDR; databpts[1] = BADADDR; codebpts[0] = BADADDR; codebpts[1] = BADADDR; dbcon = 0; // disable all bpts if ( is_xscale ) disable_hwbpts(); }