diff options
Diffstat (limited to 'usr.bin/pmdb/break.c')
-rw-r--r-- | usr.bin/pmdb/break.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/pmdb/break.c b/usr.bin/pmdb/break.c index da5e3150f0d..18e708baf97 100644 --- a/usr.bin/pmdb/break.c +++ b/usr.bin/pmdb/break.c @@ -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 <art@openbsd.org> * All rights reserved. @@ -79,13 +79,13 @@ bkpt_enable(struct pstate *ps, struct breakpoint *bkpt) { 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); } |