mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
[249162] Using -exec-jump instead of 'jump' for GDB 7.0
This commit is contained in:
parent
97b4973f32
commit
84c9c078cd
3 changed files with 70 additions and 2 deletions
|
@ -39,6 +39,7 @@ import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakDelete;
|
|||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakInsert;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MICommand;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecContinue;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecJump;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecReverseContinue;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecReverseNext;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecReverseNextInstruction;
|
||||
|
@ -485,6 +486,39 @@ public class GDBRunControl_7_0 extends MIRunControl implements IReverseRunContro
|
|||
}
|
||||
}
|
||||
|
||||
/** @since 3.0 */
|
||||
@Override
|
||||
public void resumeAtLocation(IExecutionDMContext context, String location, RequestMonitor rm) {
|
||||
assert context != null;
|
||||
|
||||
final IMIExecutionDMContext dmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
|
||||
if (dmc == null){
|
||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Given context: " + context + " is not an thread execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rm.done();
|
||||
return;
|
||||
}
|
||||
|
||||
if (doCanResume(dmc)) {
|
||||
setResumePending(true);
|
||||
getCache().setContextAvailable(dmc, false);
|
||||
getConnection().queueCommand(
|
||||
new MIExecJump(dmc, location),
|
||||
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
|
||||
@Override
|
||||
protected void handleFailure() {
|
||||
setResumePending(false);
|
||||
getCache().setContextAvailable(dmc, true);
|
||||
|
||||
super.handleFailure();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED,
|
||||
"Cannot resume given DMC.", null)); //$NON-NLS-1$
|
||||
rm.done();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @nooverride This method is not intended to be re-implemented or extended by clients.
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
|
|
|
@ -38,13 +38,13 @@ import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
|
|||
import org.eclipse.cdt.dsf.mi.service.IMIRunControl;
|
||||
import org.eclipse.cdt.dsf.mi.service.MIRunControl;
|
||||
import org.eclipse.cdt.dsf.mi.service.MIStack;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIJump;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakDelete;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakInsert;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MICommand;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecContinue;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecFinish;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecInterrupt;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecJump;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecNext;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecNextInstruction;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.commands.MIExecStep;
|
||||
|
@ -702,7 +702,7 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService implements IMIRunCo
|
|||
|
||||
threadState.fResumePending = true;
|
||||
fConnection.queueCommand(
|
||||
new CLIJump(dmc, location),
|
||||
new MIExecJump(dmc, location),
|
||||
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
|
||||
@Override
|
||||
protected void handleFailure() {
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Ericsson - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.dsf.mi.service.command.commands;
|
||||
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* -exec-jump LOCATION
|
||||
*
|
||||
* <p>
|
||||
* Resumes execution of the inferior program at LOCATION
|
||||
* </p>
|
||||
*
|
||||
* Available since GDB 7.0
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class MIExecJump extends MICommand<MIInfo>
|
||||
{
|
||||
public MIExecJump(IExecutionDMContext ctx, String location) {
|
||||
super(ctx, "-exec-jump", null, new String[] { location }); //$NON-NLS-1$
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue