[BACK]Return to break.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / pmdb

Diff for /src/usr.bin/pmdb/Attic/break.c between version 1.7 and 1.8

version 1.7, 2002/11/27 22:36:24 version 1.8, 2003/08/02 20:38:38
Line 79 
Line 79 
 {  {
         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);
         }          }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8