• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download

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