1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 339882: Make use of GDB's 'scheduler-locking' option

This commit is contained in:
Marc Khouzam 2011-07-21 13:12:37 -04:00
parent db669ba963
commit 1923edd05c
2 changed files with 44 additions and 0 deletions

View file

@ -100,6 +100,7 @@ import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetDetachOnFork;
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;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetSchedulerLocking;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetSolibAbsolutePrefix;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetSolibSearchPath;
import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetTargetAsync;
@ -618,6 +619,11 @@ public class CommandFactory {
return new MIGDBSetPagination(ctx, isSet);
}
/** @since 4.1 */
public ICommand<MIInfo> createMIGDBSetSchedulerLocking(ICommandControlDMContext ctx, String mode) {
return new MIGDBSetSchedulerLocking(ctx, mode);
}
/** @since 4.0 */
public ICommand<MIInfo> createMIGDBSetSolibAbsolutePrefix(ICommandControlDMContext ctx, String prefix) {
return new MIGDBSetSolibAbsolutePrefix(ctx, prefix);

View file

@ -0,0 +1,38 @@
/*******************************************************************************
* Copyright (c) 2011 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:
* Marc Khouzam (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 scheduler-locking [on|step|off]
*
* Set the scheduler locking mode. If it is off, then there is no locking and any thread may run at any time.
* If on, then only the current thread may run when the inferior is resumed. The step mode optimizes for
* single-stepping; it prevents other threads from preempting the current thread while you are stepping, so
* that the focus of debugging does not change unexpectedly. Other threads only rarely (or never) get a chance
* to run when you step. They are more likely to run when you `next' over a function call, and they are
* completely free to run when you use commands like `continue', `until', or `finish'. However, unless another
* thread hits a breakpoint during its timeslice, gdb does not change the current thread away from the thread
* that you are debugging.
*
* @since 4.1
*/
public class MIGDBSetSchedulerLocking extends MIGDBSet
{
/**
* @param mode The value to be send to GDB. Can be 'on', 'off', 'step'
*/
public MIGDBSetSchedulerLocking(ICommandControlDMContext ctx, String mode) {
super(ctx, new String[] {"scheduler-locking", mode});//$NON-NLS-1$
}
}