From 176c7265677179a23f56d08515beed62629ad5eb Mon Sep 17 00:00:00 2001 From: David Inglis Date: Wed, 17 Nov 2004 19:57:54 +0000 Subject: [PATCH] api update to use IBinaryObject instead of IBinaryExecutable in debugger --- debug/org.eclipse.cdt.debug.core/ChangeLog | 10 ++++++++++ .../org/eclipse/cdt/debug/core/CDIDebugModel.java | 6 ++++-- .../src/org/eclipse/cdt/debug/core/ICDIDebugger.java | 4 ++-- .../eclipse/cdt/debug/core/model/IExecFileInfo.java | 4 ++-- .../cdt/debug/internal/core/CDebugAdapter.java | 4 ++-- .../cdt/debug/internal/core/model/CDebugTarget.java | 12 ++++++------ debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 6 ++++++ .../eclipse/cdt/debug/mi/core/GDBCDIDebugger.java | 9 +++++---- launch/org.eclipse.cdt.launch/ChangeLog | 9 +++++++++ .../eclipse/cdt/launch/AbstractCLaunchDelegate.java | 8 ++++---- .../cdt/launch/internal/CoreFileLaunchDelegate.java | 4 ++-- .../launch/internal/LocalAttachLaunchDelegate.java | 4 ++-- .../cdt/launch/internal/LocalRunLaunchDelegate.java | 4 ++-- 13 files changed, 56 insertions(+), 28 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index d227e81c6a3..2b62b7473ff 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,13 @@ +2004-11-17 David Inglis + + Change debug target to use IBinaryObject instead of IBinaryExecutable + + * src/org/eclipse/cdt/debug/core/CDIDebugModel.java + * src/org/eclipse/cdt/debug/core/ICDIDebugger.java + * src/org/eclipse/cdt/debug/core/model/IExecFileInfo.java + * src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java + * src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java + 2004-11-16 Alain Magloire Optimize things by providing a new method ICDIRegisterGroup.hasRegisters(); diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java index dd6cce0e7b7..2327eb3a86c 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java @@ -13,12 +13,14 @@ package org.eclipse.cdt.debug.core; import java.io.IOException; import java.text.MessageFormat; import java.util.HashMap; + import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.IAddress; import org.eclipse.cdt.core.IBinaryParser; import org.eclipse.cdt.core.ICExtensionReference; import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; import org.eclipse.cdt.core.IBinaryParser.IBinaryFile; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.debug.core.cdi.ICDILocation; import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration; @@ -85,7 +87,7 @@ public class CDIDebugModel { * @return a debug target * @throws DebugException */ - public static IDebugTarget newDebugTarget( final ILaunch launch, final IProject project, final ICDITarget cdiTarget, final String name, final IProcess debuggeeProcess, final IBinaryExecutable file, final boolean allowTerminate, final boolean allowDisconnect, final boolean stopInMain, final boolean resumeTarget ) throws DebugException { + public static IDebugTarget newDebugTarget( final ILaunch launch, final IProject project, final ICDITarget cdiTarget, final String name, final IProcess debuggeeProcess, final IBinaryObject file, final boolean allowTerminate, final boolean allowDisconnect, final boolean stopInMain, final boolean resumeTarget ) throws DebugException { final IDebugTarget[] target = new IDebugTarget[1]; IWorkspaceRunnable r = new IWorkspaceRunnable() { @@ -127,7 +129,7 @@ public class CDIDebugModel { * @return a debug target * @throws DebugException */ - public static IDebugTarget newDebugTarget( ILaunch launch, IProject project, ICDITarget cdiTarget, final String name, IProcess debuggeeProcess, IBinaryExecutable file, boolean allowTerminate, boolean allowDisconnect, boolean resumeTarget ) throws DebugException { + public static IDebugTarget newDebugTarget( ILaunch launch, IProject project, ICDITarget cdiTarget, final String name, IProcess debuggeeProcess, IBinaryObject file, boolean allowTerminate, boolean allowDisconnect, boolean resumeTarget ) throws DebugException { return newDebugTarget( launch, project, cdiTarget, name, debuggeeProcess, file, allowTerminate, allowDisconnect, false, resumeTarget ); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java index 6e27fec264a..d04d5c5ee48 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDIDebugger.java @@ -8,7 +8,7 @@ ******************************************************************************/ package org.eclipse.cdt.debug.core; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.debug.core.cdi.ICDISession; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; @@ -16,6 +16,6 @@ import org.eclipse.debug.core.ILaunch; public interface ICDIDebugger { - public ICDISession createDebuggerSession(ILaunch launch, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException; + public ICDISession createDebuggerSession(ILaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException; } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IExecFileInfo.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IExecFileInfo.java index 420be5fd678..28788bd8355 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IExecFileInfo.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IExecFileInfo.java @@ -10,7 +10,7 @@ ***********************************************************************/ package org.eclipse.cdt.debug.core.model; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.debug.core.DebugException; /** @@ -18,7 +18,7 @@ import org.eclipse.debug.core.DebugException; */ public interface IExecFileInfo { - public IBinaryExecutable getExecFile(); + public IBinaryObject getExecFile(); public boolean isLittleEndian(); diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java index 54ffb5e2f14..40725faca1b 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugAdapter.java @@ -13,7 +13,7 @@ import java.text.MessageFormat; import java.util.Date; import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.ICDIDebugger; @@ -53,7 +53,7 @@ public class CDebugAdapter implements ICDIDebugger { * org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable, * org.eclipse.core.runtime.IProgressMonitor) */ - public ICDISession createDebuggerSession(ILaunch launch, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException { + public ICDISession createDebuggerSession(ILaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException { ILaunchConfiguration config = launch.getLaunchConfiguration(); IFile[] exeFile = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(exe.getPath()); if (exeFile.length == 0) { diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java index e5e167c232c..5d6634db21b 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java @@ -16,10 +16,10 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; + import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.IAddress; import org.eclipse.cdt.core.IAddressFactory; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.IBinaryParser.ISymbol; import org.eclipse.cdt.debug.core.CDIDebugModel; @@ -194,7 +194,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv /** * The executable binary file associated with this target. */ - private IBinaryExecutable fBinaryFile; + private IBinaryObject fBinaryFile; /** * The project associated with this target. @@ -221,7 +221,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv /** * Constructor for CDebugTarget. */ - public CDebugTarget( ILaunch launch, IProject project, ICDITarget cdiTarget, String name, IProcess debuggeeProcess, IBinaryExecutable file, boolean allowsTerminate, boolean allowsDisconnect) { + public CDebugTarget( ILaunch launch, IProject project, ICDITarget cdiTarget, String name, IProcess debuggeeProcess, IBinaryObject file, boolean allowsTerminate, boolean allowsDisconnect) { super( null ); setLaunch( launch ); setDebugTarget( this ); @@ -1417,15 +1417,15 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.model.IExecFileInfo#getExecFile() */ - public IBinaryExecutable getExecFile() { + public IBinaryObject getExecFile() { return getBinaryFile(); } - public IBinaryExecutable getBinaryFile() { + public IBinaryObject getBinaryFile() { return fBinaryFile; } - private void setExecFile( IBinaryExecutable file ) { + private void setExecFile( IBinaryObject file ) { fBinaryFile = file; } diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 5ea9583fd20..4655f0a6f7b 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,9 @@ +2004-11-17 David Inglis + + ICDIDebugger change to use IBinaryObject instead of IBnaryExecutable + + * stc/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java + 2004-11-17 Alain Magloire Fix for 78816 * mi/org/eclipse/cdt/debug/mi/core/MIInferior.java diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java index f5244147c19..c4f9a6110af 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java @@ -19,6 +19,7 @@ import java.util.Date; import java.util.List; import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.debug.core.ICDIDebugger; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.cdi.CDIException; @@ -53,7 +54,7 @@ public class GDBCDIDebugger implements ICDIDebugger { /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.ICDIDebugger#createDebuggerSession(org.eclipse.debug.core.ILaunch, org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable, org.eclipse.core.runtime.IProgressMonitor) */ - public ICDISession createDebuggerSession(ILaunch launch, IBinaryExecutable exe, IProgressMonitor monitor) + public ICDISession createDebuggerSession(ILaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException { fLaunch = launch; ILaunchConfiguration config = launch.getLaunchConfiguration(); @@ -89,7 +90,7 @@ public class GDBCDIDebugger implements ICDIDebugger { return dsession; } - public Session createLaunchSession(ILaunchConfiguration config, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException { + public Session createLaunchSession(ILaunchConfiguration config, IBinaryObject exe, IProgressMonitor monitor) throws CoreException { Session session = null; boolean failed = false; try { @@ -124,7 +125,7 @@ public class GDBCDIDebugger implements ICDIDebugger { } } - public Session createAttachSession(ILaunchConfiguration config, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException { + public Session createAttachSession(ILaunchConfiguration config, IBinaryObject exe, IProgressMonitor monitor) throws CoreException { Session session = null; boolean failed = false; try { @@ -155,7 +156,7 @@ public class GDBCDIDebugger implements ICDIDebugger { } } - public Session createCoreSession(ILaunchConfiguration config, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException { + public Session createCoreSession(ILaunchConfiguration config, IBinaryObject exe, IProgressMonitor monitor) throws CoreException { Session session = null; boolean failed = false; try { diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index 51c0829ff03..16ef54a1a7b 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,12 @@ +2004-11-17 David Inglis + + Change to use IBinaryObject instead of IBinayExecutable + + * src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java + * src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java + * src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java + * src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java + 2004-11-11 Alain Magloire Fix for PR 78441 * src/org/eclipse/cdt/launch/internal/CPropertyTester.java diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java index 2616c1b2050..04ce1eaaee6 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java @@ -26,7 +26,7 @@ import java.util.Map.Entry; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.IBinaryParser; import org.eclipse.cdt.core.ICExtensionReference; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.model.ICModelMarker; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.debug.core.CDebugCorePlugin; @@ -725,12 +725,12 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat * @return * @throws CoreException */ - protected IBinaryExecutable verifyBinary(ICProject project, IPath exePath) throws CoreException { + protected IBinaryObject verifyBinary(ICProject project, IPath exePath) throws CoreException { ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(project.getProject()); for (int i = 0; i < parserRef.length; i++) { try { IBinaryParser parser = (IBinaryParser)parserRef[i].createExtension(); - IBinaryExecutable exe = (IBinaryExecutable)parser.getBinary(exePath); + IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath); if (exe != null) { return exe; } @@ -740,7 +740,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat } IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser(); try { - return (IBinaryExecutable)parser.getBinary(exePath); + return (IBinaryObject)parser.getBinary(exePath); } catch (ClassCastException e) { } catch (IOException e) { } diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java index c1d91634053..6f961a40d19 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java @@ -8,7 +8,7 @@ **************************************************************************************************/ package org.eclipse.cdt.launch.internal; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.debug.core.CDIDebugModel; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; @@ -50,7 +50,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate { monitor.worked(1); IPath exePath = verifyProgramPath(config); ICProject project = verifyCProject(config); - IBinaryExecutable exeFile = verifyBinary(project, exePath); + IBinaryObject exeFile = verifyBinary(project, exePath); ICDebugConfiguration debugConfig = getDebugConfig(config); ICDISession dsession = null; diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java index eb9b1b13a57..31a6e10ad39 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java @@ -8,7 +8,7 @@ ******************************************************************************/ package org.eclipse.cdt.launch.internal; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.debug.core.CDIDebugModel; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; @@ -56,7 +56,7 @@ public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate { monitor.worked(1); IPath exePath = verifyProgramPath(config); ICProject project = verifyCProject(config); - IBinaryExecutable exeFile = verifyBinary(project, exePath); + IBinaryObject exeFile = verifyBinary(project, exePath); if (mode.equals(ILaunchManager.DEBUG_MODE)) { ICDebugConfiguration debugConfig = getDebugConfig(config); diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java index aa773f1d1c1..b33a48291fe 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java @@ -13,7 +13,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; -import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.debug.core.CDIDebugModel; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; @@ -56,7 +56,7 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate { monitor.worked(1); IPath exePath = verifyProgramPath(config); ICProject project = verifyCProject(config); - IBinaryExecutable exeFile = verifyBinary(project, exePath); + IBinaryObject exeFile = verifyBinary(project, exePath); String arguments[] = getProgramArgumentsArray(config); // set the default source locator if required