version 1.7, 2002/11/27 22:36:24 |
version 1.8, 2003/08/02 20:38:38 |
|
|
{ |
{ |
reg pc = bkpt->bkpt_pc; |
reg pc = bkpt->bkpt_pc; |
|
|
if (process_read(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN)) { |
if (process_read(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN) < 0) { |
warn("Can't read process contents at 0x%lx", pc); |
warn("Can't read process contents at 0x%lx", pc); |
return (-1); |
return (-1); |
} |
} |
if (process_write(ps, pc, &bkpt_insn, BREAKPOINT_LEN)) { |
if (process_write(ps, pc, &bkpt_insn, BREAKPOINT_LEN) < 0) { |
warn("Can't write breakpoint at 0x%lx, attempting backout.", pc); |
warn("Can't write breakpoint at 0x%lx, attempting backout.", pc); |
if (process_write(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN)) |
if (process_write(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN) < 0) |
warn("Backout failed, process unstable"); |
warn("Backout failed, process unstable"); |
return (-1); |
return (-1); |
} |
} |