Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 337602
Collapse All | Expand All

(-)src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java (-1 / +4 lines)
Lines 51-56 Link Here
51
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
51
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
52
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
52
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
53
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager;
53
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager;
54
import org.eclipse.cdt.dsf.mi.service.MIProcesses;
54
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
55
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
55
import org.eclipse.cdt.dsf.mi.service.command.commands.CLICommand;
56
import org.eclipse.cdt.dsf.mi.service.command.commands.CLICommand;
56
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
57
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
Lines 212-219 Link Here
212
        			String args = fGDBBackend.getProgramArguments();
213
        			String args = fGDBBackend.getProgramArguments();
213
        			
214
        			
214
            		if (args != null) {
215
            		if (args != null) {
216
        				String[] argArray = args.replaceAll("\n", " ").split(" ");  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
217
        				IMIContainerDMContext containerDmc = fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
215
            			fCommandControl.queueCommand(
218
            			fCommandControl.queueCommand(
216
            					fCommandFactory.createMIGDBSetArgs(fCommandControl.getContext(), args), 
219
            					fCommandFactory.createMIGDBSetArgs(containerDmc, argArray), 
217
            					new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
220
            					new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
218
            		} else {
221
            		} else {
219
            			requestMonitor.done();
222
            			requestMonitor.done();
(-)src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence.java (-2 / +2 lines)
Lines 183-191 Link Here
183
			String args = fBackend.getProgramArguments();
183
			String args = fBackend.getProgramArguments();
184
184
185
			if (args != null) {
185
			if (args != null) {
186
				String[] argArray = args.replaceAll("\n", " ").split(" ");  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
186
				fCommandControl.queueCommand(
187
				fCommandControl.queueCommand(
187
						// here we need to pass the proper container context
188
						fCommandFactory.createMIGDBSetArgs(getContainerContext(), argArray), 
188
						fCommandFactory.createMIGDBSetArgs(fCommandControl.getContext(), args), 
189
						new DataRequestMonitor<MIInfo>(ImmediateExecutor.getInstance(), rm));
189
						new DataRequestMonitor<MIInfo>(ImmediateExecutor.getInstance(), rm));
190
			} else {
190
			} else {
191
				rm.done();
191
				rm.done();
(-)src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java (-16 / +3 lines)
Lines 527-542 Link Here
527
		return new MIExecUntil(dmc, loc);
527
		return new MIExecUntil(dmc, loc);
528
	}
528
	}
529
529
530
	@Deprecated
531
	public ICommand<MIInfo> createMIFileExecAndSymbols(ICommandControlDMContext dmc, String file) {
532
		return new MIFileExecAndSymbols(dmc, file);
533
	}
534
535
	@Deprecated
536
	public ICommand<MIInfo> createMIFileExecAndSymbols(ICommandControlDMContext dmc) {
537
		return new MIFileExecAndSymbols(dmc);
538
	}
539
540
	/**  @since 4.0 */
530
	/**  @since 4.0 */
541
	public ICommand<MIInfo> createMIFileExecAndSymbols(IMIContainerDMContext dmc, String file) {
531
	public ICommand<MIInfo> createMIFileExecAndSymbols(IMIContainerDMContext dmc, String file) {
542
		return new MIFileExecAndSymbols(dmc, file);
532
		return new MIFileExecAndSymbols(dmc, file);
Lines 571-586 Link Here
571
		return new MIGDBSet(ctx, params);
561
		return new MIGDBSet(ctx, params);
572
	}
562
	}
573
563
574
	public ICommand<MIInfo> createMIGDBSetArgs(ICommandControlDMContext dmc) {
564
	/** @since 4.0 */
565
	public ICommand<MIInfo> createMIGDBSetArgs(IMIContainerDMContext dmc) {
575
		return new MIGDBSetArgs(dmc);
566
		return new MIGDBSetArgs(dmc);
576
	}
567
	}
577
568
578
	public ICommand<MIInfo> createMIGDBSetArgs(ICommandControlDMContext dmc, String arguments) {
579
		return new MIGDBSetArgs(dmc, arguments);
580
	}
581
582
	/** @since 4.0 */
569
	/** @since 4.0 */
583
	public ICommand<MIInfo> createMIGDBSetArgs(ICommandControlDMContext dmc, String[] arguments) {
570
	public ICommand<MIInfo> createMIGDBSetArgs(IMIContainerDMContext dmc, String[] arguments) {
584
		return new MIGDBSetArgs(dmc, arguments);
571
		return new MIGDBSetArgs(dmc, arguments);
585
	}
572
	}
586
	
573
	
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetArgs.java (-15 / +7 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 Ericsson and others.
2
 * Copyright (c) 2008, 2011 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-18 Link Here
12
12
13
package org.eclipse.cdt.dsf.mi.service.command.commands;
13
package org.eclipse.cdt.dsf.mi.service.command.commands;
14
14
15
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
15
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
16
16
17
/**
17
/**
18
 *      -gdb-set args ARGS
18
 *      -gdb-set args ARGS
Lines 21-34 Link Here
21
 * @since 1.1
21
 * @since 1.1
22
 */
22
 */
23
public class MIGDBSetArgs extends MIGDBSet {
23
public class MIGDBSetArgs extends MIGDBSet {
24
    public MIGDBSetArgs(ICommandControlDMContext dmc) {
24
25
    /** @since 4.0 */
26
	public MIGDBSetArgs(IMIContainerDMContext dmc) {
25
        this(dmc, new String[0]);
27
        this(dmc, new String[0]);
26
    }
28
    }
27
29
28
    /**
30
    /** @since 4.0 */
29
	 * @since 4.0
31
    public MIGDBSetArgs(IMIContainerDMContext dmc, String[] arguments) {
30
	 */
31
    public MIGDBSetArgs(ICommandControlDMContext dmc, String[] arguments) {
32
        super(dmc, null);
32
        super(dmc, null);
33
33
34
    	String[] cmdArray = new String[arguments.length + 1];
34
    	String[] cmdArray = new String[arguments.length + 1];
Lines 38-49 Link Here
38
    	}
38
    	}
39
    	setParameters(cmdArray);
39
    	setParameters(cmdArray);
40
    }
40
    }
41
42
    /**
43
     * @deprecated Use MIGDBSetArgs(ICommandControlDMContext, String[]) instead.
44
     */
45
    @Deprecated
46
    public MIGDBSetArgs(ICommandControlDMContext dmc, String arguments) {
47
        this(dmc, arguments.replaceAll("\n", " ").split(" ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
48
    }
49
}
41
}

Return to bug 337602