1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 248595: Use the "set breakpoint pending on" command to make breakpoints/tracepoints set in the gdb console, or using a CLI command, still be pending if needed.

This commit is contained in:
Marc Khouzam 2010-09-02 12:34:31 +00:00
parent 97428465a4
commit e1d34d2d31
3 changed files with 55 additions and 0 deletions

View file

@ -75,6 +75,7 @@ public class FinalLaunchSequence extends ReflectionSequence {
return new String[] {
"stepInitializeFinalLaunchSequence", //$NON-NLS-1$
"stepSetEnvironmentDirectory", //$NON-NLS-1$
"stepSetBreakpointPending", //$NON-NLS-1$
"stepSourceGDBInitFile", //$NON-NLS-1$
"stepSetEnvironmentVariables", //$NON-NLS-1$
"stepSetExecutable", //$NON-NLS-1$
@ -163,6 +164,22 @@ public class FinalLaunchSequence extends ReflectionSequence {
requestMonitor.done();
}
}
/**
* Allow breakpoints/tracepoints to be set as pending when using the gdb console
* or a CLI command to create them.
* @since 4.0
*/
@Execute
public void stepSetBreakpointPending(final RequestMonitor requestMonitor) {
if (fSessionType != SessionType.CORE) {
fCommandControl.queueCommand(
fCommandFactory.createMIGDBSetBreakpointPending(fCommandControl.getContext(), true),
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
} else {
requestMonitor.done();
}
}
/**
* Source the gdbinit file specified in the launch.

View file

@ -86,6 +86,7 @@ import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBExit;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSet;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetArgs;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetAutoSolib;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetBreakpointPending;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetEnv;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetNonStop;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetPagination;
@ -554,6 +555,11 @@ public class CommandFactory {
return new MIGDBSetAutoSolib(ctx, isSet);
}
/** @since 4.0 */
public ICommand<MIInfo> createMIGDBSetBreakpointPending(ICommandControlDMContext ctx, boolean enable) {
return new MIGDBSetBreakpointPending(ctx, enable);
}
public ICommand<MIInfo> createMIGDBSetEnv(ICommandControlDMContext dmc, String name) {
return new MIGDBSetEnv(dmc, name);
}

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* 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.command.ICommandControlService.ICommandControlDMContext;
/**
*
* -gdb-set breakpoint pending [on | off]
*
* This command should be used to make breakpoints/tracepoints that are created
* using a CLI command to be set as potentially pending breakpoints in GDB.
*
* Available with GDB 6.1
*
* @since 4.0
*
*/
public class MIGDBSetBreakpointPending extends MIGDBSet
{
public MIGDBSetBreakpointPending(ICommandControlDMContext ctx, boolean enable) {
super(ctx, new String[] {"breakpoint", "pending", enable ? "on" : "off"});//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
}
}