mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Adapter for 'IResource' in 'DisassemblyStorage'.
This commit is contained in:
parent
d8253db6e6
commit
7747d5a8c8
4 changed files with 29 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-01-02 Mikhail Khodjaiants
|
||||||
|
The 'DisassemblyStorage' class implements an adapter for the 'IResource' class and returns the executable file.
|
||||||
|
* IExecFileInfo.java: added a new method: 'getExecFile'
|
||||||
|
* CDebugTarget.java
|
||||||
|
* DisassemblyStorage.java
|
||||||
|
|
||||||
2003-01-02 Mikhail Khodjaiants
|
2003-01-02 Mikhail Khodjaiants
|
||||||
If breakpoint or watchpoint has been disabled before launching the debugger doesn't disable it.
|
If breakpoint or watchpoint has been disabled before launching the debugger doesn't disable it.
|
||||||
* CDebugTarget.java
|
* CDebugTarget.java
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.core.model;
|
package org.eclipse.cdt.debug.core.model;
|
||||||
|
|
||||||
|
import org.eclipse.core.resources.IFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides access to executable file information.
|
* Provides access to executable file information.
|
||||||
*
|
*
|
||||||
|
@ -13,7 +15,9 @@ package org.eclipse.cdt.debug.core.model;
|
||||||
*/
|
*/
|
||||||
public interface IExecFileInfo
|
public interface IExecFileInfo
|
||||||
{
|
{
|
||||||
|
public IFile getExecFile();
|
||||||
|
|
||||||
public boolean isLittleEndian();
|
public boolean isLittleEndian();
|
||||||
|
|
||||||
public IGlobalVariable[] getGlobals();
|
public IGlobalVariable[] getGlobals();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,9 @@ import java.io.InputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
||||||
|
import org.eclipse.cdt.debug.core.model.IExecFileInfo;
|
||||||
import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage;
|
import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IStorage;
|
import org.eclipse.core.resources.IStorage;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -129,6 +131,8 @@ public class DisassemblyStorage implements IDisassemblyStorage
|
||||||
return this;
|
return this;
|
||||||
if ( adapter.equals( DisassemblyStorage.class ) )
|
if ( adapter.equals( DisassemblyStorage.class ) )
|
||||||
return this;
|
return this;
|
||||||
|
if ( adapter.equals( IResource.class ) )
|
||||||
|
return getBinary();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,4 +210,17 @@ public class DisassemblyStorage implements IDisassemblyStorage
|
||||||
{
|
{
|
||||||
return ( 16 + maxFunctionName + Long.toString( maxOffset ).length() );
|
return ( 16 + maxFunctionName + Long.toString( maxOffset ).length() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IResource getBinary()
|
||||||
|
{
|
||||||
|
if ( getDebugTarget() != null )
|
||||||
|
{
|
||||||
|
IExecFileInfo info = (IExecFileInfo)getDebugTarget().getAdapter( IExecFileInfo.class );
|
||||||
|
if ( info != null )
|
||||||
|
{
|
||||||
|
return info.getExecFile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1957,7 +1957,7 @@ public class CDebugTarget extends CDebugElement
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IFile getExecFile()
|
public IFile getExecFile()
|
||||||
{
|
{
|
||||||
return fExecFile;
|
return fExecFile;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue