本文整理汇总了Java中org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket.getNextValueAsThreadID方法的典型用法代码示例。如果您正苦于以下问题:Java CommandPacket.getNextValueAsThreadID方法的具体用法?Java CommandPacket.getNextValueAsThreadID怎么用?Java CommandPacket.getNextValueAsThreadID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket
的用法示例。
在下文中一共展示了CommandPacket.getNextValueAsThreadID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: waitEvent
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
protected long waitEvent(int requestID) {
long targetThreadID = 0;
CommandPacket event = debuggeeWrapper.vmMirror
.receiveCertainEvent(JDWPConstants.EventKind.METHOD_ENTRY);
byte suspendPolicy = event.getNextValueAsByte();
int events = event.getNextValueAsInt();
logWriter.println(" EVENT_THREAD event: suspendPolicy=" + suspendPolicy
+ " events=" + events);
for (int i = 0; i < events; i++) {
byte eventKind = event.getNextValueAsByte();
int newRequestID = event.getNextValueAsInt();
long threadID = event.getNextValueAsThreadID();
//Location location =
event.getNextValueAsLocation();
logWriter.println(" EVENT_THREAD event " + i + ": eventKind="
+ eventKind + " requestID=" + newRequestID + " threadID="
+ threadID);
if (newRequestID == requestID) {
targetThreadID = threadID;
}
}
assertAllDataRead(event);
assertTrue("targetThreadID must be != 0", targetThreadID != 0);
return targetThreadID;
}