mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-18 22:45:23 +02:00
runUntil
This commit is contained in:
parent
f9aab8b132
commit
3bccbf3c16
6 changed files with 68 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2002-11-27 Alain Magloire
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java (runUntil): new method.
|
||||||
|
* src/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java (runUntil): new method.
|
||||||
|
|
||||||
2002-11-27 Mikhail Khodjaiants
|
2002-11-27 Mikhail Khodjaiants
|
||||||
Typo in plugin.properties.
|
Typo in plugin.properties.
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
package org.eclipse.cdt.debug.core.cdi.model;
|
package org.eclipse.cdt.debug.core.cdi.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterObject;
|
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
|
|
||||||
|
@ -202,7 +203,15 @@ public interface ICDITarget extends ICDIObject {
|
||||||
* @throws CDIException if this method fails. Reasons include:
|
* @throws CDIException if this method fails. Reasons include:
|
||||||
*/
|
*/
|
||||||
void finish() throws CDIException;
|
void finish() throws CDIException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Continues running until location is reached. Can only be called when the associated
|
||||||
|
* target is suspended.
|
||||||
|
*
|
||||||
|
* @throws CDIException if this method fails. Reasons include:
|
||||||
|
*/
|
||||||
|
void runUntil(ICDILocation location) throws CDIException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the currently selected thread.
|
* Returns the currently selected thread.
|
||||||
*
|
*
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
package org.eclipse.cdt.debug.core.cdi.model;
|
package org.eclipse.cdt.debug.core.cdi.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -116,6 +117,14 @@ public interface ICDIThread extends ICDIObject {
|
||||||
*/
|
*/
|
||||||
void stepIntoInstruction() throws CDIException;
|
void stepIntoInstruction() throws CDIException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Continues running until location is reached.
|
||||||
|
* Can only be called when the associated thread is suspended.
|
||||||
|
*
|
||||||
|
* @throws CDIException if this method fails. Reasons include:
|
||||||
|
*/
|
||||||
|
void runUntil(ICDILocation location) throws CDIException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Continues running until just after function in the current
|
* Continues running until just after function in the current
|
||||||
* stack frame returns. Can only be called when the associated
|
* stack frame returns. Can only be called when the associated
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2002-11-28 Alain Magloire
|
||||||
|
|
||||||
|
* src/.../mi/core/cdi/CTarget.java (runUntil): new method implemented.
|
||||||
|
* src/.../mi/core/cdi/CThread.java (runUntil): new method implemented.
|
||||||
|
|
||||||
2002-11-26 Doug Schaefer
|
2002-11-26 Doug Schaefer
|
||||||
|
|
||||||
* src/.../mi/core/CygwinGDBDebugger.java:
|
* src/.../mi/core/CygwinGDBDebugger.java:
|
||||||
|
|
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterObject;
|
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariable;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariable;
|
||||||
|
@ -27,6 +28,7 @@ import org.eclipse.cdt.debug.mi.core.command.MIExecNextInstruction;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIExecRun;
|
import org.eclipse.cdt.debug.mi.core.command.MIExecRun;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIExecStep;
|
import org.eclipse.cdt.debug.mi.core.command.MIExecStep;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIExecStepInstruction;
|
import org.eclipse.cdt.debug.mi.core.command.MIExecStepInstruction;
|
||||||
|
import org.eclipse.cdt.debug.mi.core.command.MIExecUntil;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIInfoThreads;
|
import org.eclipse.cdt.debug.mi.core.command.MIInfoThreads;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MITargetDetach;
|
import org.eclipse.cdt.debug.mi.core.command.MITargetDetach;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
|
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
|
||||||
|
@ -423,6 +425,34 @@ public class CTarget implements ICDITarget {
|
||||||
lastExecutionToken = finish.getToken();
|
lastExecutionToken = finish.getToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#runUntil(ICDILocation)
|
||||||
|
*/
|
||||||
|
public void runUntil(ICDILocation location) throws CDIException {
|
||||||
|
MISession mi = session.getMISession();
|
||||||
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
String loc = "";
|
||||||
|
if (location.getFile() != null) {
|
||||||
|
loc = location.getFile() + ":" + location.getLineNumber();
|
||||||
|
} else if (location.getFunction() != null) {
|
||||||
|
loc = location.getFunction();
|
||||||
|
} else if (location.getAddress() != 0) {
|
||||||
|
loc = "" + location.getAddress();
|
||||||
|
}
|
||||||
|
MIExecUntil until = factory.createMIExecUntil(loc);
|
||||||
|
try {
|
||||||
|
mi.postCommand(until);
|
||||||
|
MIInfo info = until.getMIInfo();
|
||||||
|
if (info == null) {
|
||||||
|
throw new CDIException("No answer");
|
||||||
|
}
|
||||||
|
} catch (MIException e) {
|
||||||
|
throw new CDIException(e.getMessage());
|
||||||
|
}
|
||||||
|
lastExecutionToken = until.getToken();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#evaluateExpressionToString(String)
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#evaluateExpressionToString(String)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
|
||||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||||
|
@ -254,6 +255,14 @@ public class CThread extends CObject implements ICDIThread {
|
||||||
getTarget().stepReturn();
|
getTarget().stepReturn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#runUntil(ICDILocation)
|
||||||
|
*/
|
||||||
|
public void runUntil(ICDILocation location) throws CDIException {
|
||||||
|
getCTarget().setCurrentThread(this);
|
||||||
|
getTarget().runUntil(location);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#suspend()
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#suspend()
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue