217: if (readMem(addr, &code, sz, 2) != sz) return E_BPBAD;
218: if (writeMem(addr, &sbpCode.b[sz], sz, 2) != sz) return E_BPROM;
219: writeMem(addr, &code, sz, 2);
220: } else {
320: if (pc == stepPt.addr) bpflg = 0x100;
321: writeMem(stepPt.addr, &stepPt.code, n, 2);
322: if (stepPt.pc > 0) {
323: // restore the changed instruction (ARM instruction only)
324: writeMem(stepPt.pc, &stepPt.inst, 4, 2);
325: // restore the changed register
351: bpflg = (p - brkPt) | 0x10;
352: writeMem(p->addr, &p->code, n, 2);
353: p->atr |= BA_SET;
381: readMem(stepPt.pc = pc, &stepPt.inst, 4, 2);
382: writeMem(pc, &inst, 4, 2);
383: // restore the changed register
391: readMem(stepPt.addr, &stepPt.code, n, 2);
392: writeMem(stepPt.addr, &sbpCode.b[n], n, 2);
393: }
460: readMem(p->addr, &p->code, p->sz, 2);
461: writeMem(p->addr, &sbpCode.b[p->sz], p->sz, 2);
462: }