Lines Matching refs:Method
83 Method* method; /* method we're associated with */
233 static bool dvmBreakpointSetAdd(BreakpointSet* pSet, Method* method,
237 const u2* addr = method->insns + instrOffset;
258 pBreak->method = method;
267 * If the method has not been verified, we do NOT insert the
277 if (dvmIsClassVerified(method->clazz)) {
279 method->clazz->descriptor, addr);
282 *addr, method->clazz->descriptor, method->name,
286 dvmDexChangeDex1(method->clazz->pDvmDex, (u1*)addr,
291 method->clazz->descriptor, addr);
311 static void dvmBreakpointSetRemove(BreakpointSet* pSet, Method* method,
314 const u2* addr = method->insns + instrOffset;
321 method->clazz->descriptor, method->name, instrOffset);
325 method->clazz->descriptor, method->name, instrOffset);
338 dvmDexChangeDex1(method->clazz->pDvmDex, (u1*)addr,
369 if (pBreak->method->clazz == clazz) {
371 * The breakpoint is associated with a method in this class.
379 *pBreak->addr, pBreak->method->clazz->descriptor,
380 pBreak->method->name, pBreak->addr - pBreak->method->insns);
419 void dvmAddBreakAddr(Method* method, unsigned int instrOffset)
423 dvmBreakpointSetAdd(pSet, method, instrOffset);
437 void dvmClearBreakAddr(Method* method, unsigned int instrOffset)
441 dvmBreakpointSetRemove(pSet, method, instrOffset);
477 * We don't want to modify the bytecode of a method before the verifier
527 * We may be stepping into or over method calls, or running until we
528 * return from the current method. To make this work we need to track
529 * the current line, current method, and current stack depth. We need
535 * an interpreted method, everything we need is in the current frame. If
536 * we're in a native method, possibly with some extra JNI frames pushed
537 * on by PushLocalFrame, we want to use the topmost native method.
545 const Method* method;
548 method = saveArea->method;
550 if (!dvmIsBreakFrame((u4*)fp) && !dvmIsNativeMethod(method))
565 LOGV("##### init step while in native method");
568 assert(dvmIsNativeMethod(SAVEAREA_FROM_FP(fp)->method));
576 pCtrl->method = saveArea->method;
583 if (dvmIsNativeMethod(pCtrl->method)) {
586 pCtrl->line = dvmLineNumFromPC(saveArea->method,
587 saveArea->xtra.currentPc - saveArea->method->insns);
589 = dvmAddressSetForLine(saveArea->method, pCtrl->line);
596 pCtrl->thread, pCtrl->method, pCtrl->method->name,
620 const Method* curMethod = self->interpSave.method;
645 void dvmReportInvoke(Thread* self, const Method* methodToCall)
655 * method.
657 void dvmReportPreNativeInvoke(const Method* methodToCall, Thread* self, u4* fp)
662 * builder can't follow into or through a native method.
669 Object* thisPtr = dvmGetThisPtr(self->interpSave.method, fp);
678 * method.
680 void dvmReportPostNativeInvoke(const Method* methodToCall, Thread* self, u4* fp)
683 Object* thisPtr = dvmGetThisPtr(self->interpSave.method, fp);
693 * The interpreter has returned from a normal method. Handle any special
698 TRACE_METHOD_EXIT(self, self->interpSave.method);
712 * Set "methodEntry" if we've just entered the method. This detects
713 * method exit by checking to see if the next instruction is "return".
715 * This can't catch native method entry/exit, so we have to handle that
727 * TODO: method entry/exit events are probably less common than location
731 static void updateDebugger(const Method* method, const u2* pc, const u4* fp,
771 assert(!dvmIsNativeMethod(method));
775 * Step into method calls. We break when the line number
776 * or method pointer changes. If we're in SS_MIN mode, we
779 if (pCtrl->method != method) {
781 msg = "new method";
786 pCtrl->pAddressSet, pc - method->insns)) {
792 * Step over method calls. We break when the line number is
794 * depth. (We can't just compare on the method, because we
802 msg = "method pop";
809 pc - method->insns)) {
817 * Return from the current method. We break when the frame
820 * This differs from the "method exit" break in that it stops
827 msg = "method pop";
845 * We're also not supposed to generate a method exit event if the method
860 Object* thisPtr = dvmGetThisPtr(method, fp);
867 char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
869 method->clazz->descriptor, method->name, desc);
873 dvmDbgPostLocationEvent(method, pc - method->insns, thisPtr,
879 * Recover the "this" pointer from the current interpreted method. "this"
885 * fairly common to have a virtual method that doesn't use its "this"
890 * in JDWP that is expected to work for any non-native non-static method.
895 Object* dvmGetThisPtr(const Method* method, const u4* fp)
897 if (dvmIsStaticMethod(method))
899 return (Object*)fp[method->registersSize - method->insSize];
911 void dvmInterpCheckTrackedRefs(Thread* self, const Method* method,
925 desc = dexProtoCopyMethodDescriptor(&method->prototype);
926 LOGE(" current method is %s.%s %s", method->clazz->descriptor,
927 method->name, desc);
949 void dvmDumpRegs(const Method* method, const u4* framePtr, bool inOnly)
953 localCount = method->registersSize - method->insSize;
956 for (i = method->registersSize-1; i >= 0; i--) {
968 DexFile* pDexFile = method->clazz->pDexFile;
969 const DexCode* pDexCode = dvmGetMethodCode(method);
1234 * Find the concrete method that corresponds to "methodIdx". The code in
1235 * "method" is executing invoke-method with "thisClass" as its first argument.
1239 Method* dvmInterpFindInterfaceMethod(ClassObject* thisClass, u4 methodIdx,
1240 const Method* method, DvmDex* methodClassDex)
1242 Method* absMethod;
1243 Method* methodToCall;
1247 * Resolve the method. This gives us the abstract method from the
1252 absMethod = dvmResolveInterfaceMethod(method->clazz, methodIdx);
1254 LOGV("+ unknown method");
1265 * the method's entry. The value there is the offset into our
1266 * vtable of the actual method to execute.
1293 dvmThrowAbstractMethodError("interface method not implemented");
1317 static std::string classNameFromIndex(const Method* method, int ref,
1320 const DvmDex* pDvmDex = method->clazz->pDvmDex;
1326 /* get class ID from method ID */
1340 result += " from class " + dvmHumanReadableDescriptor(method->clazz->descriptor);
1347 static std::string fieldNameFromIndex(const Method* method, int ref,
1355 const DvmDex* pDvmDex = method->clazz->pDvmDex;
1367 result += dvmHumanReadableDescriptor(method->clazz->descriptor);
1372 static std::string methodNameFromIndex(const Method* method, int ref,
1380 const DvmDex* pDvmDex = method->clazz->pDvmDex;
1388 char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
1390 result += "tried to access method ";
1392 result += " from class " + dvmHumanReadableDescriptor(method->clazz->descriptor);
1408 void dvmThrowVerificationError(const Method* method, int kind, int ref)
1420 msg = classNameFromIndex(method, ref, refType, 0);
1424 msg = fieldNameFromIndex(method, ref, refType, 0);
1428 msg = methodNameFromIndex(method, ref, refType, 0);
1432 msg = classNameFromIndex(method, ref, refType,
1437 msg = fieldNameFromIndex(method, ref, refType,
1442 msg = methodNameFromIndex(method, ref, refType,
1447 msg = classNameFromIndex(method, ref, refType, 0);
1451 msg = classNameFromIndex(method, ref, refType, 0);
1698 const Method* method = self->interpSave.method;
1700 assert(pc >= method->insns && pc <
1701 method->insns + dvmGetMethodInsnsSize(method));
1705 * When we hit a specific method, enable verbose instruction logging.
1714 strcmp(method->clazz->descriptor, cd) == 0 &&
1715 strcmp(method->name, mn) == 0 &&
1716 strcmp(method->shorty, sg) == 0)
1719 method->clazz->descriptor, method->name);
1721 dumpRegs(method, fp, true);
1765 updateDebugger(method, pc, fp, self);
1780 dvmInterpCheckTrackedRefs(self, method,
1874 * This begins executing code at the start of "method". On exit, "pResult"
1875 * holds the return value of the method (or, if "method" returns NULL, it
1878 * The interpreted stack frame, which holds the method arguments, has
1881 void dvmInterpret(Thread* self, const Method* method, JValue* pResult)
1934 self->interpSave.method = method;
1936 self->interpSave.pc = method->insns;
1938 assert(!dvmIsNativeMethod(method));
1944 if (method->clazz->status < CLASS_INITIALIZING ||
1945 method->clazz->status == CLASS_ERROR)
1948 method->clazz->descriptor, method->clazz->status);