fix dvmDbgOutputAllInterfaces to include only direct super-interfaces

As the javadoc and the spec say dvmDbgOutputAllInterfaces should output only
the directly implemented interfaces. This can be achieved by just iterating
over the `clazz->interfaces`.

Issue: http://code.google.com/p/android/issues/detail?id=21422
Change-Id: I1779e2cc2ada7afaaf4a1e2e5c7861d61d9ea014
Signed-off-by: Johannes Rudolph <johannes.rudolph@gmail.com>
diff --git a/vm/Debugger.cpp b/vm/Debugger.cpp
index 5a4e0e5..b54facd 100644
--- a/vm/Debugger.cpp
+++ b/vm/Debugger.cpp
@@ -1264,20 +1264,15 @@
 void dvmDbgOutputAllInterfaces(RefTypeId refTypeId, ExpandBuf* pReply)
 {
     ClassObject* clazz;
-    int i, start, count;
+    int i, count;
 
     clazz = refTypeIdToClassObject(refTypeId);
     assert(clazz != NULL);
 
-    if (clazz->super == NULL)
-        start = 0;
-    else
-        start = clazz->super->iftableCount;
-
-    count = clazz->iftableCount - start;
+    count = clazz->interfaceCount;
     expandBufAdd4BE(pReply, count);
-    for (i = start; i < clazz->iftableCount; i++) {
-        ClassObject* iface = clazz->iftable[i].clazz;
+    for (i = 0; i < count; i++) {
+        ClassObject* iface = clazz->interfaces[i];
         expandBufAddRefTypeId(pReply, classObjectToRefTypeId(iface));
     }
 }