=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/pmdb/Attic/break.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/pmdb/Attic/break.c 2002/11/27 22:36:24 1.7 +++ src/usr.bin/pmdb/Attic/break.c 2003/08/02 20:38:38 1.8 @@ -1,4 +1,4 @@ -/* $OpenBSD: break.c,v 1.7 2002/11/27 22:36:24 pvalchev Exp $ */ +/* $OpenBSD: break.c,v 1.8 2003/08/02 20:38:38 mickey Exp $ */ /* * Copyright (c) 2002 Artur Grabowski * All rights reserved. @@ -79,13 +79,13 @@ { 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); 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); - 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"); return (-1); }