1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00
This commit is contained in:
Alain Magloire 2002-11-28 16:20:02 +00:00
parent f9aab8b132
commit 3bccbf3c16
6 changed files with 68 additions and 1 deletions

View file

@ -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
Typo in plugin.properties.

View file

@ -7,6 +7,7 @@
package org.eclipse.cdt.debug.core.cdi.model;
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.ICDISession;
@ -202,7 +203,15 @@ public interface ICDITarget extends ICDIObject {
* @throws CDIException if this method fails. Reasons include:
*/
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.
*

View file

@ -7,6 +7,7 @@
package org.eclipse.cdt.debug.core.cdi.model;
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;
/**
* 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
* stack frame returns. Can only be called when the associated

View file

@ -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
* src/.../mi/core/CygwinGDBDebugger.java:

View file

@ -9,6 +9,7 @@ import java.util.ArrayList;
import java.util.List;
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.ICDISession;
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.MIExecStep;
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.MITargetDetach;
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
@ -423,6 +425,34 @@ public class CTarget implements ICDITarget {
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)
*/

View file

@ -6,6 +6,7 @@
package org.eclipse.cdt.debug.mi.core.cdi;
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.ICDIThread;
import org.eclipse.cdt.debug.mi.core.MIException;
@ -254,6 +255,14 @@ public class CThread extends CObject implements ICDIThread {
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()
*/