[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.3 and 1.4

version 1.3, 2002/07/12 00:24:53 version 1.4, 2002/07/22 01:20:50
Line 79 
Line 79 
 {  {
         reg pc = bkpt->bkpt_pc;          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);                  warn("Can't read process contents at 0x%lx", pc);
                 return (-1);                  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);                  warn("Can't write breakpoint at 0x%lx, attempting backout.", pc);
                 if (write_to_pid(ps->ps_pid, pc, &bkpt->bkpt_old,                  if (process_write(ps, pc, &bkpt->bkpt_old, BREAKPOINT_LEN))
                     BREAKPOINT_LEN))  
                         warn("Backout failed, process unstable");                          warn("Backout failed, process unstable");
                 return (-1);                  return (-1);
         }          }
Line 130 
Line 129 
 {  {
         TAILQ_REMOVE(&ps->ps_bkpts, bkpt, bkpt_list);          TAILQ_REMOVE(&ps->ps_bkpts, bkpt, bkpt_list);
   
         if (write_to_pid(ps->ps_pid, bkpt->bkpt_pc, &bkpt->bkpt_old,          if (process_write(ps, bkpt->bkpt_pc, &bkpt->bkpt_old, BREAKPOINT_LEN))
             BREAKPOINT_LEN))  
                 warn("Breakpoint removal failed, process unstable");                  warn("Breakpoint removal failed, process unstable");
   
         free(bkpt);          free(bkpt);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4