=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/pmdb/Attic/break.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/pmdb/Attic/break.c 2002/07/12 00:24:53 1.3 +++ src/usr.bin/pmdb/Attic/break.c 2002/07/22 01:20:50 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: break.c,v 1.3 2002/07/12 00:24:53 deraadt Exp $ */ +/* $OpenBSD: break.c,v 1.4 2002/07/22 01:20:50 art Exp $ */ /* * Copyright (c) 2002 Artur Grabowski * All rights reserved. @@ -79,14 +79,13 @@ { reg pc = bkpt->bkpt_pc; - if (read_from_pid(ps->ps_pid, pc, &bkpt->bkpt_old, BREAKPOINT_LEN)) { + if (process_read(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN)) { warn("Can't read process contents at 0x%lx", pc); return (-1); } - if (write_to_pid(ps->ps_pid, pc, &bkpt_insn, BREAKPOINT_LEN)) { + if (process_write(ps, pc, &bkpt_insn, BREAKPOINT_LEN)) { warn("Can't write breakpoint at 0x%lx, attempting backout.", pc); - if (write_to_pid(ps->ps_pid, pc, &bkpt->bkpt_old, - BREAKPOINT_LEN)) + if (process_write(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN)) warn("Backout failed, process unstable"); return (-1); } @@ -130,8 +129,7 @@ { TAILQ_REMOVE(&ps->ps_bkpts, bkpt, bkpt_list); - if (write_to_pid(ps->ps_pid, bkpt->bkpt_pc, &bkpt->bkpt_old, - BREAKPOINT_LEN)) + if (process_write(ps, bkpt->bkpt_pc, &bkpt->bkpt_old, BREAKPOINT_LEN)) warn("Breakpoint removal failed, process unstable"); free(bkpt);