Fixes to interpreter and debugger for JDWP.
- Fixed off-by-one error for MethodEndCodeIndex.
- Changed first instance of dex_pc 0 in interpreter Execute to output
METHOD_ENTRY event.
Change-Id: I4854cb7cbde0db53db23d8b1c5bb9f08bf8409f1
diff --git a/src/debugger.cc b/src/debugger.cc
index 12ea5e2..a75cd8c 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -1118,8 +1118,8 @@
end = -1;
} else {
start = 0;
- // TODO: what are the units supposed to be? *2?
- end = mh.GetCodeItem()->insns_size_in_code_units_;
+ // Return the index of the last instruction
+ end = mh.GetCodeItem()->insns_size_in_code_units_ - 1;
}
expandBufAdd8BE(pReply, start);