mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
api update to use IBinaryObject instead of IBinaryExecutable in debugger
This commit is contained in:
parent
d074ea78ab
commit
176c726567
13 changed files with 56 additions and 28 deletions
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue