本文整理汇总了Java中com.sun.jdi.InvalidStackFrameException类的典型用法代码示例。如果您正苦于以下问题:Java InvalidStackFrameException类的具体用法?Java InvalidStackFrameException怎么用?Java InvalidStackFrameException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InvalidStackFrameException类属于com.sun.jdi包,在下文中一共展示了InvalidStackFrameException类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getOwnedMonitors
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
public List<MonitorInfo> getOwnedMonitors() {
List<MonitorInfo> threadMonitors;
try {
threadMonitors = getThread().getOwnedMonitorsAndFrames();
} catch (InvalidStackFrameException itsex) {
threadMonitors = Collections.emptyList();
} catch (VMDisconnectedException e) {
threadMonitors = Collections.emptyList();
}
if (threadMonitors.size() == 0) {
return threadMonitors;
}
List<MonitorInfo> frameMonitors = new ArrayList<MonitorInfo>();
for (MonitorInfo mi : threadMonitors) {
if (this.equals(mi.getFrame())) {
frameMonitors.add(mi);
}
}
return Collections.unmodifiableList(frameMonitors);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:CallStackFrameImpl.java
示例2: getFilteredFrames
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
private List<StackFrame> getFilteredFrames() throws IncompatibleThreadStateException {
List<StackFrame> frames = F3Wrapper.wrapFrames(virtualMachine(), underlying().frames());
List<StackFrame> filteredFrames = new ArrayList<StackFrame>(frames.size());
try {
for (StackFrame fr : frames) {
F3StackFrame f3fr = (F3StackFrame) fr;
// don't add F3 synthetic frames
if (f3fr.location().method().isF3InternalMethod()) {
continue;
} else {
filteredFrames.add(f3fr);
}
}
} catch (InvalidStackFrameException exp) {
throw new IncompatibleThreadStateException(exp.getMessage());
}
return filteredFrames;
}
开发者ID:unktomi,项目名称:form-follows-function,代码行数:19,代码来源:F3ThreadReference.java
示例3: actionPerformed
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
StackFrameProxyImpl stackFrame = getStackFrameProxy(e);
if(stackFrame == null) {
return;
}
try {
DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
if(debugProcess == null) {
return;
}
debugProcess.getManagerThread().schedule(debugProcess.createPopFrameCommand(debuggerContext, stackFrame));
}
catch (NativeMethodException e2){
Messages.showMessageDialog(project, DebuggerBundle.message("error.native.method.exception"), ActionsBundle.actionText(DebuggerActions.POP_FRAME), Messages.getErrorIcon());
}
catch (InvalidStackFrameException ignored) {
}
catch(VMDisconnectedException vde) {
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:PopFrameAction.java
示例4: toJDIException
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
RuntimeException toJDIException() {
switch (errorCode) {
case JDWP.Error.INVALID_OBJECT:
return new ObjectCollectedException();
case JDWP.Error.INVALID_MODULE:
return new InvalidModuleException();
case JDWP.Error.VM_DEAD:
return new VMDisconnectedException();
case JDWP.Error.OUT_OF_MEMORY:
return new VMOutOfMemoryException();
case JDWP.Error.CLASS_NOT_PREPARED:
return new ClassNotPreparedException();
case JDWP.Error.INVALID_FRAMEID:
case JDWP.Error.NOT_CURRENT_FRAME:
return new InvalidStackFrameException();
case JDWP.Error.NOT_IMPLEMENTED:
return new UnsupportedOperationException();
case JDWP.Error.INVALID_INDEX:
case JDWP.Error.INVALID_LENGTH:
return new IndexOutOfBoundsException();
case JDWP.Error.TYPE_MISMATCH:
return new InconsistentDebugInfoException();
case JDWP.Error.INVALID_THREAD:
return new IllegalThreadStateException();
default:
return new InternalException("Unexpected JDWP Error: " + errorCode, errorCode);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:29,代码来源:JDWPException.java
示例5: thisObject
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
public ObjectReference thisObject() {
validateStackFrame();
MethodImpl currentMethod = (MethodImpl)location.method();
if (currentMethod.isStatic() || currentMethod.isNative()) {
return null;
} else {
if (thisObject == null) {
PacketStream ps;
/* protect against defunct frame id */
synchronized (vm.state()) {
validateStackFrame();
ps = JDWP.StackFrame.ThisObject.
enqueueCommand(vm, thread, id);
}
/* actually get it, now that order is guaranteed */
try {
thisObject = JDWP.StackFrame.ThisObject.
waitForReply(vm, ps).objectThis;
} catch (JDWPException exc) {
switch (exc.errorCode()) {
case JDWP.Error.INVALID_FRAMEID:
case JDWP.Error.THREAD_NOT_SUSPENDED:
case JDWP.Error.INVALID_THREAD:
throw new InvalidStackFrameException();
default:
throw exc.toJDIException();
}
}
}
}
return thisObject;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:35,代码来源:StackFrameImpl.java
示例6: pop
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
void pop() throws IncompatibleThreadStateException {
validateStackFrame();
// flush caches and disable caching until command completion
CommandSender sender =
new CommandSender() {
public PacketStream send() {
return JDWP.StackFrame.PopFrames.enqueueCommand(vm,
thread, id);
}
};
try {
PacketStream stream = thread.sendResumingCommand(sender);
JDWP.StackFrame.PopFrames.waitForReply(vm, stream);
} catch (JDWPException exc) {
switch (exc.errorCode()) {
case JDWP.Error.THREAD_NOT_SUSPENDED:
throw new IncompatibleThreadStateException(
"Thread not current or suspended");
case JDWP.Error.INVALID_THREAD: /* zombie */
throw new IncompatibleThreadStateException("zombie");
case JDWP.Error.NO_MORE_FRAMES:
throw new InvalidStackFrameException(
"No more frames on the stack");
default:
throw exc.toJDIException();
}
}
// enable caching - suspended again
vm.state().freeze();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:StackFrameImpl.java
示例7: pop
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
/**
* Pop a StackFrame from its thread.
*
* @param frame
* the StackFrame will be popped
*/
public static void pop(StackFrame frame) throws DebugException {
try {
frame.thread().popFrames(frame);
} catch (IncompatibleThreadStateException | InvalidStackFrameException e) {
throw new DebugException(e.getMessage(), e);
}
}
开发者ID:Microsoft,项目名称:java-debug,代码行数:14,代码来源:StackFrameUtility.java
示例8: processException
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
private EvaluateException processException(Exception e) {
if(e instanceof InconsistentDebugInfoException) {
return new EvaluateException(DebuggerBundle.message("error.inconsistent.debug.info"), null);
}
else if(e instanceof InvalidStackFrameException) {
return new EvaluateException(DebuggerBundle.message("error.invalid.stackframe"), null);
}
else {
return EvaluateExceptionUtil.DEBUG_INFO_UNAVAILABLE;
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:NodeDescriptorImpl.java
示例9: validateMonitorInfo
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
private void validateMonitorInfo() {
if (!isValid) {
throw new InvalidStackFrameException("Thread has been resumed");
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:MonitorInfoImpl.java
示例10: validateStackFrame
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
void validateStackFrame() {
if (!isValid) {
throw new InvalidStackFrameException("Thread has been resumed");
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:StackFrameImpl.java
示例11: setValue
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
public void setValue(LocalVariable variableIntf, Value valueIntf)
throws InvalidTypeException, ClassNotLoadedException {
validateStackFrame();
validateMirror(variableIntf);
validateMirrorOrNull(valueIntf);
LocalVariableImpl variable = (LocalVariableImpl)variableIntf;
ValueImpl value = (ValueImpl)valueIntf;
if (!variable.isVisible(this)) {
throw new IllegalArgumentException(variable.name() +
" is not valid at this frame location");
}
try {
// Validate and convert value if necessary
value = ValueImpl.prepareForAssignment(value, variable);
JDWP.StackFrame.SetValues.SlotInfo[] slotVals =
new JDWP.StackFrame.SetValues.SlotInfo[1];
slotVals[0] = new JDWP.StackFrame.SetValues.
SlotInfo(variable.slot(), value);
PacketStream ps;
/* protect against defunct frame id */
synchronized (vm.state()) {
validateStackFrame();
ps = JDWP.StackFrame.SetValues.
enqueueCommand(vm, thread, id, slotVals);
}
/* actually set it, now that order is guaranteed */
try {
JDWP.StackFrame.SetValues.waitForReply(vm, ps);
} catch (JDWPException exc) {
switch (exc.errorCode()) {
case JDWP.Error.INVALID_FRAMEID:
case JDWP.Error.THREAD_NOT_SUSPENDED:
case JDWP.Error.INVALID_THREAD:
throw new InvalidStackFrameException();
default:
throw exc.toJDIException();
}
}
} catch (ClassNotLoadedException e) {
/*
* Since we got this exception,
* the variable type must be a reference type. The value
* we're trying to set is null, but if the variable's
* class has not yet been loaded through the enclosing
* class loader, then setting to null is essentially a
* no-op, and we should allow it without an exception.
*/
if (value != null) {
throw e;
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:61,代码来源:StackFrameImpl.java
示例12: getArgumentValues
import com.sun.jdi.InvalidStackFrameException; //导入依赖的package包/类
public List<Value> getArgumentValues() {
validateStackFrame();
MethodImpl mmm = (MethodImpl)location.method();
List<String> argSigs = mmm.argumentSignatures();
int count = argSigs.size();
JDWP.StackFrame.GetValues.SlotInfo[] slots =
new JDWP.StackFrame.GetValues.SlotInfo[count];
int slot;
if (mmm.isStatic()) {
slot = 0;
} else {
slot = 1;
}
for (int ii = 0; ii < count; ++ii) {
char sigChar = argSigs.get(ii).charAt(0);
slots[ii] = new JDWP.StackFrame.GetValues.SlotInfo(slot++,(byte)sigChar);
if (sigChar == 'J' || sigChar == 'D') {
slot++;
}
}
PacketStream ps;
/* protect against defunct frame id */
synchronized (vm.state()) {
validateStackFrame();
ps = JDWP.StackFrame.GetValues.enqueueCommand(vm, thread, id, slots);
}
ValueImpl[] values;
try {
values = JDWP.StackFrame.GetValues.waitForReply(vm, ps).values;
} catch (JDWPException exc) {
switch (exc.errorCode()) {
case JDWP.Error.INVALID_FRAMEID:
case JDWP.Error.THREAD_NOT_SUSPENDED:
case JDWP.Error.INVALID_THREAD:
throw new InvalidStackFrameException();
default:
throw exc.toJDIException();
}
}
if (count != values.length) {
throw new InternalException(
"Wrong number of values returned from target VM");
}
return Arrays.asList((Value[])values);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:51,代码来源:StackFrameImpl.java
注:本文中的com.sun.jdi.InvalidStackFrameException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论