* Remove debugging printfs in the debugger

This commit is contained in:
pancake 2011-07-06 01:45:45 +02:00
parent 77816183a0
commit 45a6b0d2ce
2 changed files with 8 additions and 7 deletions

View File

@ -63,14 +63,14 @@ R_API int r_bp_restore(struct r_bp_t *bp, int set) {
continue;
/* write obytes from every breakpoint in r_bp if not handled by plugin */
if (set) {
eprintf ("Setting bp at 0x%08"PFMT64x"\n", b->addr);
//eprintf ("Setting bp at 0x%08"PFMT64x"\n", b->addr);
if (b->hw || !b->obytes)
eprintf ("hw breakpoints not supported yet\n");
eprintf ("hw breakpoints not yet supported\n");
else bp->iob.write_at (bp->iob.io, b->addr, b->obytes, b->size);
} else {
eprintf ("Clearing bp at 0x%08"PFMT64x"\n", b->addr);
//eprintf ("Clearing bp at 0x%08"PFMT64x"\n", b->addr);
if (b->hw || !b->bbytes)
eprintf ("hw breakpoints not supported yet\n");
eprintf ("hw breakpoints not yet supported\n");
else bp->iob.write_at (bp->iob.io, b->addr, b->bbytes, b->size);
}
}

View File

@ -15,12 +15,12 @@ static int r_debug_recoil(RDebug *dbg) {
if (ri) {
ut64 addr = r_reg_get_value (dbg->reg, ri);
recoil = r_bp_recoil (dbg->bp, addr);
eprintf ("Recoil at 0x%"PFMT64x" = %d\n", addr, recoil);
eprintf ("[R2] Breakpoint recoil at 0x%"PFMT64x" = %d\n", addr, recoil);
if (recoil) {
dbg->reason = R_DBG_REASON_BP;
r_reg_set_value (dbg->reg, ri, addr-recoil);
r_debug_reg_sync (dbg, R_REG_TYPE_GPR, R_TRUE);
eprintf ("[BP Hit] Setting pc to 0x%"PFMT64x"\n", (addr-recoil));
//eprintf ("[BP Hit] Setting pc to 0x%"PFMT64x"\n", (addr-recoil));
return R_TRUE;
}
} else eprintf ("r_debug_recoil: Cannot get program counter\n");
@ -169,9 +169,10 @@ R_API int r_debug_detach(struct r_debug_t *dbg, int pid) {
}
R_API int r_debug_select(RDebug *dbg, int pid, int tid) {
if (pid != dbg->pid || tid != dbg->tid)
eprintf ("r_debug_select: %d %d\n", pid, tid);
dbg->pid = pid;
dbg->tid = tid;
eprintf ("r_debug_select: %d %d\n", pid, tid);
return R_TRUE;
}