1*e82f7db8SAndroid Build Coastguard Worker /* 2*e82f7db8SAndroid Build Coastguard Worker * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 3*e82f7db8SAndroid Build Coastguard Worker * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*e82f7db8SAndroid Build Coastguard Worker * 5*e82f7db8SAndroid Build Coastguard Worker * This code is free software; you can redistribute it and/or modify it 6*e82f7db8SAndroid Build Coastguard Worker * under the terms of the GNU General Public License version 2 only, as 7*e82f7db8SAndroid Build Coastguard Worker * published by the Free Software Foundation. Oracle designates this 8*e82f7db8SAndroid Build Coastguard Worker * particular file as subject to the "Classpath" exception as provided 9*e82f7db8SAndroid Build Coastguard Worker * by Oracle in the LICENSE file that accompanied this code. 10*e82f7db8SAndroid Build Coastguard Worker * 11*e82f7db8SAndroid Build Coastguard Worker * This code is distributed in the hope that it will be useful, but WITHOUT 12*e82f7db8SAndroid Build Coastguard Worker * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13*e82f7db8SAndroid Build Coastguard Worker * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14*e82f7db8SAndroid Build Coastguard Worker * version 2 for more details (a copy is included in the LICENSE file that 15*e82f7db8SAndroid Build Coastguard Worker * accompanied this code). 16*e82f7db8SAndroid Build Coastguard Worker * 17*e82f7db8SAndroid Build Coastguard Worker * You should have received a copy of the GNU General Public License version 18*e82f7db8SAndroid Build Coastguard Worker * 2 along with this work; if not, write to the Free Software Foundation, 19*e82f7db8SAndroid Build Coastguard Worker * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20*e82f7db8SAndroid Build Coastguard Worker * 21*e82f7db8SAndroid Build Coastguard Worker * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22*e82f7db8SAndroid Build Coastguard Worker * or visit www.oracle.com if you need additional information or have any 23*e82f7db8SAndroid Build Coastguard Worker * questions. 24*e82f7db8SAndroid Build Coastguard Worker */ 25*e82f7db8SAndroid Build Coastguard Worker 26*e82f7db8SAndroid Build Coastguard Worker #ifndef JDWP_THREADCONTROL_H 27*e82f7db8SAndroid Build Coastguard Worker #define JDWP_THREADCONTROL_H 28*e82f7db8SAndroid Build Coastguard Worker 29*e82f7db8SAndroid Build Coastguard Worker #include "stepControl.h" 30*e82f7db8SAndroid Build Coastguard Worker #include "invoker.h" 31*e82f7db8SAndroid Build Coastguard Worker #include "bag.h" 32*e82f7db8SAndroid Build Coastguard Worker 33*e82f7db8SAndroid Build Coastguard Worker void threadControl_initialize(void); 34*e82f7db8SAndroid Build Coastguard Worker void threadControl_reset(void); 35*e82f7db8SAndroid Build Coastguard Worker void threadControl_detachInvokes(void); 36*e82f7db8SAndroid Build Coastguard Worker 37*e82f7db8SAndroid Build Coastguard Worker void threadControl_onHook(void); 38*e82f7db8SAndroid Build Coastguard Worker void threadControl_onConnect(void); 39*e82f7db8SAndroid Build Coastguard Worker void threadControl_onDisconnect(void); 40*e82f7db8SAndroid Build Coastguard Worker 41*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_popFrames(jthread thread, FrameNumber fnum); 42*e82f7db8SAndroid Build Coastguard Worker 43*e82f7db8SAndroid Build Coastguard Worker struct bag *threadControl_onEventHandlerEntry(jbyte sessionID, 44*e82f7db8SAndroid Build Coastguard Worker EventIndex ei, jthread thread, jobject currentException); 45*e82f7db8SAndroid Build Coastguard Worker void threadControl_onEventHandlerExit(EventIndex ei, jthread thread, struct bag *); 46*e82f7db8SAndroid Build Coastguard Worker 47*e82f7db8SAndroid Build Coastguard Worker 48*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_suspendThread(jthread thread, jboolean deferred); 49*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_resumeThread(jthread thread, jboolean do_unblock); 50*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_suspendCount(jthread thread, jint *count); 51*e82f7db8SAndroid Build Coastguard Worker 52*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_suspendAll(void); 53*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_resumeAll(void); 54*e82f7db8SAndroid Build Coastguard Worker 55*e82f7db8SAndroid Build Coastguard Worker StepRequest *threadControl_getStepRequest(jthread); 56*e82f7db8SAndroid Build Coastguard Worker InvokeRequest *threadControl_getInvokeRequest(jthread); 57*e82f7db8SAndroid Build Coastguard Worker 58*e82f7db8SAndroid Build Coastguard Worker jboolean threadControl_isDebugThread(jthread thread); 59*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_addDebugThread(jthread thread); 60*e82f7db8SAndroid Build Coastguard Worker 61*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_applicationThreadStatus(jthread thread, jdwpThreadStatus *pstatus, jint *suspendStatus); 62*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_interrupt(jthread thread); 63*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_stop(jthread thread, jobject throwable); 64*e82f7db8SAndroid Build Coastguard Worker 65*e82f7db8SAndroid Build Coastguard Worker jvmtiError threadControl_setEventMode(jvmtiEventMode mode, EventIndex ei, jthread thread); 66*e82f7db8SAndroid Build Coastguard Worker jvmtiEventMode threadControl_getInstructionStepMode(jthread thread); 67*e82f7db8SAndroid Build Coastguard Worker 68*e82f7db8SAndroid Build Coastguard Worker jthread threadControl_currentThread(void); 69*e82f7db8SAndroid Build Coastguard Worker void threadControl_setPendingInterrupt(jthread thread); 70*e82f7db8SAndroid Build Coastguard Worker void threadControl_clearCLEInfo(JNIEnv *env, jthread thread); 71*e82f7db8SAndroid Build Coastguard Worker jboolean threadControl_cmpCLEInfo(JNIEnv *env, jthread thread, jclass clazz, 72*e82f7db8SAndroid Build Coastguard Worker jmethodID method, jlocation location); 73*e82f7db8SAndroid Build Coastguard Worker void threadControl_saveCLEInfo(JNIEnv *env, jthread thread, EventIndex ei, 74*e82f7db8SAndroid Build Coastguard Worker jclass clazz, jmethodID method, 75*e82f7db8SAndroid Build Coastguard Worker jlocation location); 76*e82f7db8SAndroid Build Coastguard Worker jlong threadControl_getFrameGeneration(jthread thread); 77*e82f7db8SAndroid Build Coastguard Worker 78*e82f7db8SAndroid Build Coastguard Worker #endif 79