diff options
| author | Andy McFadden <fadden@android.com> | 2009-10-13 13:06:03 -0700 |
|---|---|---|
| committer | Andy McFadden <fadden@android.com> | 2009-10-13 13:18:37 -0700 |
| commit | 6ff3c8fde9623dadad726dbd5e1658585c321751 (patch) | |
| tree | 7bddc7001bcc66214ee150acd7936f28ecb08ba6 /vm/jdwp | |
| parent | 443bffdcf07fef3017a8cdb9963a58e63b3c54ed (diff) | |
| download | android_dalvik-6ff3c8fde9623dadad726dbd5e1658585c321751.tar.gz android_dalvik-6ff3c8fde9623dadad726dbd5e1658585c321751.tar.bz2 android_dalvik-6ff3c8fde9623dadad726dbd5e1658585c321751.zip | |
Add JDWP ReferenceType.ClassObject handler.
For bug 2157236.
Diffstat (limited to 'vm/jdwp')
| -rw-r--r-- | vm/jdwp/JdwpHandler.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/vm/jdwp/JdwpHandler.c b/vm/jdwp/JdwpHandler.c index 16d9a5d3a..1163fde3b 100644 --- a/vm/jdwp/JdwpHandler.c +++ b/vm/jdwp/JdwpHandler.c @@ -665,8 +665,6 @@ static JdwpError handleRT_Interfaces(JdwpState* state, const u1* buf, int dataLen, ExpandBuf* pReply) { RefTypeId refTypeId; - u4 numInterfaces; - int i; refTypeId = dvmReadRefTypeId(&buf); @@ -679,6 +677,25 @@ static JdwpError handleRT_Interfaces(JdwpState* state, } /* + * Return the class object corresponding to this type. + */ +static JdwpError handleRT_ClassObject(JdwpState* state, + const u1* buf, int dataLen, ExpandBuf* pReply) +{ + RefTypeId refTypeId; + ObjectId classObjId; + + refTypeId = dvmReadRefTypeId(&buf); + classObjId = dvmDbgGetClassObject(refTypeId); + + LOGV(" RefTypeId %llx -> ObjectId %llx\n", refTypeId, classObjId); + + expandBufAddObjectId(pReply, classObjId); + + return ERR_NONE; +} + +/* * Returns the value of the SourceDebugExtension attribute. * * JDB seems interested, but DEX files don't currently support this. @@ -1980,7 +1997,7 @@ static const JdwpHandlerMap gHandlerMap[] = { //2, 8, NestedTypes { 2, 9, handleRT_Status, "ReferenceType.Status" }, { 2, 10, handleRT_Interfaces, "ReferenceType.Interfaces" }, - //2, 11, ClassObject + { 2, 11, handleRT_ClassObject, "ReferenceType.ClassObject" }, { 2, 12, handleRT_SourceDebugExtension, "ReferenceType.SourceDebugExtension" }, { 2, 13, handleRT_SignatureWithGeneric, |
