mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 508610 - [lldb] Arguments tab has no effect
"-gdb-set args" is not implemented in lldb-mi, use -exec-arguments instead. See also https://bugs.llvm.org/show_bug.cgi?id=38834 Change-Id: I1c9db9020effe92dae6ec13e458c3eaf165f920a Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
parent
18c2d84781
commit
fde7476a1a
2 changed files with 41 additions and 2 deletions
|
@ -13,8 +13,8 @@ import org.eclipse.cdt.dsf.debug.service.IProcesses;
|
|||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl;
|
||||
import org.eclipse.cdt.dsf.gdb.service.GdbDebugServicesFactory;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
import org.eclipse.cdt.llvm.dsf.lldb.core.internal.service.commands.LLDBCommandFactory;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,7 @@ public class LLDBServiceFactory extends GdbDebugServicesFactory {
|
|||
|
||||
@Override
|
||||
protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) {
|
||||
return new LLDBControl(session, config, new CommandFactory());
|
||||
return new LLDBControl(session, config, new LLDBCommandFactory());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2018 Marc-Andre Laperle.
|
||||
* 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
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.llvm.dsf.lldb.core.internal.service.commands;
|
||||
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommand;
|
||||
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
||||
|
||||
/**
|
||||
* A command factory specific to LLDB for cases where some commands need any
|
||||
* kind of tweaks to account for discrepancies with GDB.
|
||||
*/
|
||||
public class LLDBCommandFactory extends CommandFactory {
|
||||
|
||||
/**
|
||||
* lldb-mi (as of 8.0.0-r341271) doesn't implement "-gdb-set args" but it does
|
||||
* implement "-exec-arguments". So we just substitute here.
|
||||
* See also https://bugs.llvm.org/show_bug.cgi?id=38834
|
||||
*/
|
||||
@Override
|
||||
public ICommand<MIInfo> createMIGDBSetArgs(IMIContainerDMContext dmc) {
|
||||
return super.createMIExecArguments(dmc, new String[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #createMIGDBSetArgs(IMIContainerDMContext)
|
||||
*/
|
||||
@Override
|
||||
public ICommand<MIInfo> createMIGDBSetArgs(IMIContainerDMContext dmc, String[] arguments) {
|
||||
return super.createMIExecArguments(dmc, arguments);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue