Implement JDWP InvokeMethod and breakpoints on exception throwing.
Change-Id: I1142bee843104f0850fd7270752104d5d73a44f0
diff --git a/src/jdwp/jdwp_handler.cc b/src/jdwp/jdwp_handler.cc
index 9b5c080..238775e 100644
--- a/src/jdwp/jdwp_handler.cc
+++ b/src/jdwp/jdwp_handler.cc
@@ -49,7 +49,7 @@
*/
static void jdwpReadLocation(const uint8_t** pBuf, JdwpLocation* pLoc) {
memset(pLoc, 0, sizeof(*pLoc)); /* allows memcmp() later */
- pLoc->typeTag = Read1(pBuf);
+ pLoc->typeTag = ReadTypeTag(pBuf);
pLoc->classId = ReadObjectId(pBuf);
pLoc->methodId = ReadMethodId(pBuf);
pLoc->idx = Read8BE(pBuf);
@@ -1467,16 +1467,16 @@
* Returns the value of "this" for the specified frame.
*/
static JdwpError handleSF_ThisObject(JdwpState* state, const uint8_t* buf, int dataLen, ExpandBuf* pReply) {
- ObjectId threadId = ReadObjectId(&buf);
+ ReadObjectId(&buf); // Skip thread id.
FrameId frameId = ReadFrameId(&buf);
ObjectId objectId;
- if (!Dbg::GetThisObject(threadId, frameId, &objectId)) {
+ if (!Dbg::GetThisObject(frameId, &objectId)) {
return ERR_INVALID_FRAMEID;
}
uint8_t objectTag = Dbg::GetObjectTag(objectId);
- LOG(VERBOSE) << StringPrintf(" Req for 'this' in thread=%llx frame=%llx --> %llx '%c'", threadId, frameId, objectId, (char)objectTag);
+ LOG(VERBOSE) << StringPrintf(" Req for 'this' in frame=%llx --> %llx '%c'", frameId, objectId, (char)objectTag);
expandBufAdd1(pReply, objectTag);
expandBufAddObjectId(pReply, objectId);