diff options
author | Alena Laskavaia | 2009-09-11 13:38:52 +0000 |
---|---|---|
committer | Alena Laskavaia | 2009-09-11 13:38:52 +0000 |
commit | 3596f15371f2f5c510694f3d2adf993b2cce0e55 (patch) | |
tree | 9aaf1ae3758c4f4ff7ebf8ce287193a7e6d29ade /debug | |
parent | 691eaab7fd3d7f61a4ebd2677dcee509231db865 (diff) | |
download | org.eclipse.cdt-3596f15371f2f5c510694f3d2adf993b2cce0e55.tar.gz org.eclipse.cdt-3596f15371f2f5c510694f3d2adf993b2cce0e55.tar.xz org.eclipse.cdt-3596f15371f2f5c510694f3d2adf993b2cce0e55.zip |
[ 289002] - hook for process creation for gdb
Diffstat (limited to 'debug')
-rw-r--r-- | debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java index 7c3dd967feb..6efa195f4bb 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 QNX Software Systems and others. + * Copyright (c) 2000, 2009 QNX Software Systems 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 @@ -46,7 +46,7 @@ public class MIProcessAdapter implements MIProcess { * @throws IOException */ protected Process getGDBProcess(String[] args, int launchTimeout, IProgressMonitor monitor) throws IOException { - final Process pgdb = ProcessFactory.getFactory().exec(args); + final Process pgdb = createGDBProcess(args); int timepass = 0; if (launchTimeout <= 0) { @@ -78,6 +78,22 @@ public class MIProcessAdapter implements MIProcess { return pgdb; } + /** + * Basic process creation hook. Subclasses may override to create the process some other way, + * for example by setting the child process's environment. + * + * @param args + * the <tt>gdb</tt> command-line + * @return the <tt>gdb</tt> process + * @throws IOException + * on failure to create the child process + * + * @since 6.1 + */ + protected Process createGDBProcess(String[] args) throws IOException { + return ProcessFactory.getFactory().exec(args); + } + public boolean canInterrupt(MIInferior inferior) { return fGDBProcess instanceof Spawner; } |