1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Bug 91374: CDT launch should set ATTR_PROCESS_TYPE.

This commit is contained in:
Mikhail Khodjaiants 2005-06-21 18:41:38 +00:00
parent f2c74bc84e
commit 4732db0ae8
6 changed files with 35 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2005-05-21 Mikhail Khodjaiants
Bug 91374: CDT launch should set ATTR_PROCESS_TYPE.
* ICDTLaunchConfigurationConstants.java
2005-06-20 Mikhail Khodjaiants
Bug 93856: Variable View: Should disable change value options if selected item is not changeable.
* CVariable.java

View file

@ -17,6 +17,14 @@ public interface ICDTLaunchConfigurationConstants {
*/
public static final String ID_LAUNCH_C_APP = "org.eclipse.cdt.launch.localCLaunch"; //$NON-NLS-1$
/**
* Identifier for the C/C++ program process type, which is annotated on processes created
* by the C/C++ application launch delegate.
*
* (value <code>"C/C++"</code>).
*/
public static final String ID_PROGRAM_PROCESS_TYPE = "C/C++"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a name of a C/C++
* project associated with a C/C++ launch configuration.

View file

@ -1,3 +1,9 @@
2005-05-21 Mikhail Khodjaiants
Bug 91374: CDT launch should set ATTR_PROCESS_TYPE.
* AbstractCLaunchDelegate.java
* CoreFileLaunchDelegate.java
* LocalRunLaunchDelegate.java
2005-05-15 Mikhail Khodjaiants
Bug 87556: Post-mortem debug fails silently if core file is inaccessible.
Applied patch from Joanne Woo (Monta Vista).

View file

@ -16,13 +16,13 @@ import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Map.Entry;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IBinaryParser;
import org.eclipse.cdt.core.ICExtensionReference;
@ -59,6 +59,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IPersistableSourceLocator;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegate {
@ -724,8 +725,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
* @return
* @throws CoreException
*/
protected IBinaryObject verifyBinary(ICProject project, IPath exePath) throws CoreException {
ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(project.getProject());
protected IBinaryObject verifyBinary(ICProject proj, IPath exePath) throws CoreException {
ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(proj.getProject());
for (int i = 0; i < parserRef.length; i++) {
try {
IBinaryParser parser = (IBinaryParser)parserRef[i].createExtension();
@ -848,4 +849,15 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
}
return prop;
}
/**
* Returns the default process attribute map for C/C++ processes.
*
* @return default process attribute map for C/C++ processes
*/
protected Map getDefaultProcessMap() {
Map map = new HashMap();
map.put( IProcess.ATTR_PROCESS_TYPE, ICDTLaunchConfigurationConstants.ID_PROGRAM_PROCESS_TYPE );
return map;
}
}

View file

@ -91,7 +91,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
Process process = targets[i].getProcess();
IProcess iprocess = null;
if (process != null) {
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()));
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()), getDefaultProcessMap());
}
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(debugConfig),
iprocess, exeFile, true, false, false);

View file

@ -100,7 +100,7 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
Process process = targets[i].getProcess();
IProcess iprocess = null;
if (process != null) {
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()));
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()), getDefaultProcessMap());
}
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(debugConfig),
iprocess, exeFile, true, false, stopInMain, true);