< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c

Print this page

        

*** 535,559 **** WITH_LOCAL_REFS(env, 1) { int i; jint threadCount; jthread *theThreads; theThreads = allThreads(&threadCount); ! if (theThreads == NULL) { outStream_setError(out, JDWP_ERROR(OUT_OF_MEMORY)); } else { /* Squish out all of the debugger-spawned threads */ threadCount = filterDebugThreads(theThreads, threadCount); ! (void)outStream_writeInt(out, threadCount); ! for (i = 0; i <threadCount; i++) { (void)outStream_writeObjectRef(env, out, theThreads[i]); } jvmtiDeallocate(theThreads); } } END_WITH_LOCAL_REFS(env); return JNI_TRUE; --- 535,567 ---- WITH_LOCAL_REFS(env, 1) { int i; jint threadCount; + jint fiberCount; jthread *theThreads; + jthread *theFibers; theThreads = allThreads(&threadCount); ! theFibers = threadControl_allFibers(&fiberCount); ! ! if (theThreads == NULL || (theFibers == NULL && fiberCount != 0)) { outStream_setError(out, JDWP_ERROR(OUT_OF_MEMORY)); } else { /* Squish out all of the debugger-spawned threads */ threadCount = filterDebugThreads(theThreads, threadCount); ! (void)outStream_writeInt(out, threadCount + fiberCount); ! for (i = 0; i < fiberCount; i++) { ! (void)outStream_writeObjectRef(env, out, theFibers[i]); ! } ! for (i = 0; i < threadCount; i++) { (void)outStream_writeObjectRef(env, out, theThreads[i]); } jvmtiDeallocate(theThreads); + jvmtiDeallocate(theFibers); } } END_WITH_LOCAL_REFS(env); return JNI_TRUE;
< prev index next >