Home | History | Annotate | Download | only in c
      1 HANDLE_OPCODE(OP_BREAKPOINT)
      2     {
      3         /*
      4          * Restart this instruction with the original opcode.  We do
      5          * this by simply jumping to the handler.
      6          *
      7          * It's probably not necessary to update "inst", but we do it
      8          * for the sake of anything that needs to do disambiguation in a
      9          * common handler with INST_INST.
     10          *
     11          * The breakpoint itself is handled over in updateDebugger(),
     12          * because we need to detect other events (method entry, single
     13          * step) and report them in the same event packet, and we're not
     14          * yet handling those through breakpoint instructions.  By the
     15          * time we get here, the breakpoint has already been handled and
     16          * the thread resumed.
     17          */
     18         u1 originalOpcode = dvmGetOriginalOpcode(pc);
     19         LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
     20             INST_REPLACE_OP(inst, originalOpcode));
     21         inst = INST_REPLACE_OP(inst, originalOpcode);
     22         FINISH_BKPT(originalOpcode);
     23     }
     24 OP_END
     25