mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 07:15:39 +02:00
2004-05-18 Alain Magloire
Remove warnings and compatibility plugin to be full Eclipse-3.0 compliant.
This commit is contained in:
parent
a8037dbc3a
commit
0a0eb69d98
17 changed files with 84 additions and 70 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-18 Alain Magloire
|
||||||
|
|
||||||
|
Remove warnings and compatibility plugin
|
||||||
|
to be full Eclipse-3.0 compliant.
|
||||||
|
|
||||||
2004-05-11 Alain Magloire
|
2004-05-11 Alain Magloire
|
||||||
|
|
||||||
Preliminary work to get Parser IProblem in the CEditor.
|
Preliminary work to get Parser IProblem in the CEditor.
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class UpdateDependency implements IJob {
|
||||||
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexManager.performConcurrentJob(
|
indexManager.performConcurrentJob(
|
||||||
new PatternSearchJob(
|
new PatternSearchJob(
|
||||||
(CSearchPattern) pattern,
|
pattern,
|
||||||
scope,
|
scope,
|
||||||
pathCollector,
|
pathCollector,
|
||||||
indexManager
|
indexManager
|
||||||
|
|
|
@ -10,7 +10,6 @@ import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.ElementChangedEvent;
|
import org.eclipse.cdt.core.model.ElementChangedEvent;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.model.ICModel;
|
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
@ -87,7 +86,7 @@ public class BinaryRunner {
|
||||||
ICElement[] children = container.getChildren();
|
ICElement[] children = container.getChildren();
|
||||||
if (children.length > 0) {
|
if (children.length > 0) {
|
||||||
CModelManager factory = CModelManager.getDefault();
|
CModelManager factory = CModelManager.getDefault();
|
||||||
ICElement root = (ICModel) factory.getCModel();
|
ICElement root = factory.getCModel();
|
||||||
CElementDelta cdelta = new CElementDelta(root);
|
CElementDelta cdelta = new CElementDelta(root);
|
||||||
cdelta.added(cproject);
|
cdelta.added(cproject);
|
||||||
cdelta.added(container);
|
cdelta.added(container);
|
||||||
|
|
|
@ -497,7 +497,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
if (core == null) {
|
if (core == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
IExtensionPoint extension = core.getDescriptor().getExtensionPoint(CONTAINER_INITIALIZER_EXTPOINT_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CONTAINER_INITIALIZER_EXTPOINT_ID);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
for (int i = 0; i < extensions.length; i++) {
|
for (int i = 0; i < extensions.length; i++) {
|
||||||
|
@ -565,6 +565,11 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveRawPathEntries(ICProject cproject, IPathEntry[] entries) throws CModelException {
|
public void saveRawPathEntries(ICProject cproject, IPathEntry[] entries) throws CModelException {
|
||||||
|
// sanity
|
||||||
|
if (entries == null) {
|
||||||
|
entries = NO_PATHENTRIES;
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList list = new ArrayList(entries.length);
|
ArrayList list = new ArrayList(entries.length);
|
||||||
IPath projectPath = cproject.getPath();
|
IPath projectPath = cproject.getPath();
|
||||||
for (int i = 0; i < entries.length; i++) {
|
for (int i = 0; i < entries.length; i++) {
|
||||||
|
@ -787,7 +792,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ArrayList containerIDList = new ArrayList(5);
|
ArrayList containerIDList = new ArrayList(5);
|
||||||
IExtensionPoint extension = core.getDescriptor().getExtensionPoint(CONTAINER_INITIALIZER_EXTPOINT_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CONTAINER_INITIALIZER_EXTPOINT_ID);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
for (int i = 0; i < extensions.length; i++) {
|
for (int i = 0; i < extensions.length; i++) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<requires>
|
<requires>
|
||||||
<import plugin="org.eclipse.core.resources"/>
|
<import plugin="org.eclipse.core.resources"/>
|
||||||
<import plugin="org.eclipse.team.core"/>
|
<import plugin="org.eclipse.team.core"/>
|
||||||
<import plugin="org.eclipse.core.runtime.compatibility"/>
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
</requires>
|
</requires>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||||
import org.eclipse.cdt.internal.core.search.indexing.SourceIndexer;
|
import org.eclipse.cdt.internal.core.search.indexing.SourceIndexer;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
||||||
import org.eclipse.cdt.internal.core.search.processing.JobManager;
|
import org.eclipse.cdt.internal.core.search.processing.JobManager;
|
||||||
import org.eclipse.core.boot.BootLoader;
|
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
import org.eclipse.core.resources.IProjectDescription;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
|
@ -49,7 +48,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.core.runtime.IPluginDescriptor;
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
@ -59,6 +57,7 @@ import org.eclipse.core.runtime.Plugin;
|
||||||
import org.eclipse.core.runtime.Preferences;
|
import org.eclipse.core.runtime.Preferences;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
import org.eclipse.core.runtime.SubProgressMonitor;
|
||||||
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
public class CCorePlugin extends Plugin {
|
public class CCorePlugin extends Plugin {
|
||||||
|
|
||||||
|
@ -216,34 +215,37 @@ public class CCorePlugin extends Plugin {
|
||||||
|
|
||||||
// ------ CPlugin
|
// ------ CPlugin
|
||||||
|
|
||||||
public CCorePlugin(IPluginDescriptor descriptor) {
|
public CCorePlugin() {
|
||||||
super(descriptor);
|
super();
|
||||||
fgCPlugin = this;
|
fgCPlugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Plugin#shutdown
|
* @see Plugin#shutdown
|
||||||
*/
|
*/
|
||||||
public void shutdown() throws CoreException {
|
public void stop(BundleContext context) throws Exception {
|
||||||
if (fDescriptorManager != null) {
|
try {
|
||||||
fDescriptorManager.shutdown();
|
if (fDescriptorManager != null) {
|
||||||
|
fDescriptorManager.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fCoreModel != null) {
|
||||||
|
fCoreModel.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cdtLog != null) {
|
||||||
|
cdtLog.shutdown();
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
super.stop(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fCoreModel != null) {
|
|
||||||
fCoreModel.shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cdtLog != null) {
|
|
||||||
cdtLog.shutdown();
|
|
||||||
}
|
|
||||||
super.shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Plugin#startup
|
* @see Plugin#startup
|
||||||
*/
|
*/
|
||||||
public void startup() throws CoreException {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.startup();
|
super.start(context);
|
||||||
|
|
||||||
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$
|
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -464,7 +466,7 @@ public class CCorePlugin extends Plugin {
|
||||||
|
|
||||||
public IConsole getConsole(String id) {
|
public IConsole getConsole(String id) {
|
||||||
try {
|
try {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint("CBuildConsole"); //$NON-NLS-1$
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CBuildConsole"); //$NON-NLS-1$
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
for (int i = 0; i < extensions.length; i++) {
|
for (int i = 0; i < extensions.length; i++) {
|
||||||
|
@ -612,7 +614,7 @@ public class CCorePlugin extends Plugin {
|
||||||
if (id == null || id.length() == 0) {
|
if (id == null || id.length() == 0) {
|
||||||
id = DEFAULT_BINARY_PARSER_UNIQ_ID;
|
id = DEFAULT_BINARY_PARSER_UNIQ_ID;
|
||||||
}
|
}
|
||||||
IExtensionPoint extensionPoint = getDescriptor().getExtensionPoint(BINARY_PARSER_SIMPLE_ID);
|
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, BINARY_PARSER_SIMPLE_ID);
|
||||||
IExtension extension = extensionPoint.getExtension(id);
|
IExtension extension = extensionPoint.getExtension(id);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IConfigurationElement element[] = extension.getConfigurationElements();
|
IConfigurationElement element[] = extension.getConfigurationElements();
|
||||||
|
@ -821,7 +823,7 @@ public class CCorePlugin extends Plugin {
|
||||||
* @return IProcessList
|
* @return IProcessList
|
||||||
*/
|
*/
|
||||||
public IProcessList getProcessList() throws CoreException {
|
public IProcessList getProcessList() throws CoreException {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint("ProcessList"); //$NON-NLS-1$
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "ProcessList"); //$NON-NLS-1$
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
IConfigurationElement defaultContributor = null;
|
IConfigurationElement defaultContributor = null;
|
||||||
|
@ -834,7 +836,7 @@ public class CCorePlugin extends Plugin {
|
||||||
if (defaultContributor == null) {
|
if (defaultContributor == null) {
|
||||||
defaultContributor = configElements[j];
|
defaultContributor = configElements[j];
|
||||||
}
|
}
|
||||||
} else if (platform.equals(BootLoader.getOS())) {
|
} else if (platform.equals(Platform.getOS())) {
|
||||||
// found explicit contributor for this platform.
|
// found explicit contributor for this platform.
|
||||||
return (IProcessList) configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
|
return (IProcessList) configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -854,7 +856,7 @@ public class CCorePlugin extends Plugin {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String[] getAllErrorParsersIDs() {
|
public String[] getAllErrorParsersIDs() {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(ERROR_PARSER_SIMPLE_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, ERROR_PARSER_SIMPLE_ID);
|
||||||
String[] empty = new String[0];
|
String[] empty = new String[0];
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
|
@ -870,7 +872,7 @@ public class CCorePlugin extends Plugin {
|
||||||
public IErrorParser[] getErrorParser(String id) {
|
public IErrorParser[] getErrorParser(String id) {
|
||||||
IErrorParser[] empty = new IErrorParser[0];
|
IErrorParser[] empty = new IErrorParser[0];
|
||||||
try {
|
try {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(ERROR_PARSER_SIMPLE_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, ERROR_PARSER_SIMPLE_ID);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
List list = new ArrayList(extensions.length);
|
List list = new ArrayList(extensions.length);
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.eclipse.cdt.core.filetype.ICLanguage;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author sam.robb
|
* @author sam.robb
|
||||||
|
@ -346,7 +347,7 @@ public class CFileTypeResolver implements ICFileTypeResolver {
|
||||||
* @return the extension point, or null
|
* @return the extension point, or null
|
||||||
*/
|
*/
|
||||||
private IExtensionPoint getExtensionPoint(String extensionPointId) {
|
private IExtensionPoint getExtensionPoint(String extensionPointId) {
|
||||||
return CCorePlugin.getDefault().getDescriptor().getExtensionPoint(extensionPointId);
|
return Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, extensionPointId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -406,7 +407,8 @@ public class CFileTypeResolver implements ICFileTypeResolver {
|
||||||
String line = null;
|
String line = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
baseURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
|
//baseURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
|
||||||
|
baseURL = Platform.getBundle(element.getDeclaringExtension().getNamespace()).getEntry("/"); //$NON-NLS-1$
|
||||||
fileURL = new URL(baseURL, attr);
|
fileURL = new URL(baseURL, attr);
|
||||||
in = new BufferedReader(new InputStreamReader(fileURL.openStream()));
|
in = new BufferedReader(new InputStreamReader(fileURL.openStream()));
|
||||||
line = in.readLine();
|
line = in.readLine();
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
|
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IPluginRegistry;
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
@ -519,8 +519,8 @@ public class CDescriptor implements ICDescriptor {
|
||||||
|
|
||||||
protected ICExtension createExtensions(ICExtensionReference ext) throws CoreException {
|
protected ICExtension createExtensions(ICExtensionReference ext) throws CoreException {
|
||||||
InternalCExtension cExtension = null;
|
InternalCExtension cExtension = null;
|
||||||
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
|
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
|
||||||
IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(ext.getExtension());
|
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ext.getExtension());
|
||||||
IExtension extension = extensionPoint.getExtension(ext.getID());
|
IExtension extension = extensionPoint.getExtension(ext.getID());
|
||||||
if (extension == null) {
|
if (extension == null) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
|
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
|
||||||
|
@ -539,8 +539,8 @@ public class CDescriptor implements ICDescriptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IConfigurationElement[] getConfigurationElement(ICExtensionReference ext) throws CoreException {
|
protected IConfigurationElement[] getConfigurationElement(ICExtensionReference ext) throws CoreException {
|
||||||
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
|
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
|
||||||
IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(ext.getExtension());
|
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ext.getExtension());
|
||||||
IExtension extension = extensionPoint.getExtension(ext.getID());
|
IExtension extension = extensionPoint.getExtension(ext.getID());
|
||||||
if (extension == null) {
|
if (extension == null) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
|
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
|
||||||
|
|
|
@ -182,7 +182,7 @@ public class CDescriptorManager implements ICDescriptorManager, IResourceChangeL
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeOwnerConfiguration() {
|
private void initializeOwnerConfiguration() {
|
||||||
IExtensionPoint extpoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint("CProject"); //$NON-NLS-1$
|
IExtensionPoint extpoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CProject"); //$NON-NLS-1$
|
||||||
IExtension extension[] = extpoint.getExtensions();
|
IExtension extension[] = extpoint.getExtensions();
|
||||||
fOwnerConfigMap = new HashMap(extension.length);
|
fOwnerConfigMap = new HashMap(extension.length);
|
||||||
for (int i = 0; i < extension.length; i++) {
|
for (int i = 0; i < extension.length; i++) {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.utils;
|
package org.eclipse.cdt.utils;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IFile;
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -473,7 +473,8 @@ public class PE {
|
||||||
ReadMemoryAccess memory = new ReadMemoryAccess(data, true);
|
ReadMemoryAccess memory = new ReadMemoryAccess(data, true);
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
try {
|
try {
|
||||||
Exe.ExeHeader exeHdr = new Exe.ExeHeader(memory);
|
//Exe.ExeHeader exeHdr = new Exe.ExeHeader(memory);
|
||||||
|
new Exe.ExeHeader(memory);
|
||||||
DOSHeader dosHdr = new DOSHeader(memory);
|
DOSHeader dosHdr = new DOSHeader(memory);
|
||||||
// Jump the Coff header, and Check the sig.
|
// Jump the Coff header, and Check the sig.
|
||||||
idx = dosHdr.e_lfanew;
|
idx = dosHdr.e_lfanew;
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class Dwarf {
|
||||||
sb.append(':');
|
sb.append(':');
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
byte b = Array.getByte(value, i);
|
byte b = Array.getByte(value, i);
|
||||||
sb.append(' ').append(Integer.toHexString((int) b));
|
sb.append(' ').append(Integer.toHexString(b));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (value instanceof Number) {
|
if (value instanceof Number) {
|
||||||
|
@ -506,7 +506,7 @@ public class Dwarf {
|
||||||
|
|
||||||
case DwarfConstants.DW_FORM_strp :
|
case DwarfConstants.DW_FORM_strp :
|
||||||
{
|
{
|
||||||
int offset = (int) read_4_bytes(in);
|
int offset = read_4_bytes(in);
|
||||||
byte[] data = (byte[]) dwarfSections.get(DWARF_DEBUG_STR);
|
byte[] data = (byte[]) dwarfSections.get(DWARF_DEBUG_STR);
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
obj = new String();
|
obj = new String();
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class Stabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parse(IDebugEntryRequestor requestor) {
|
public void parse(IDebugEntryRequestor requestor) {
|
||||||
List list = new ArrayList();
|
//List list = new ArrayList();
|
||||||
long nstab = stabData.length / StabConstant.SIZE;
|
long nstab = stabData.length / StabConstant.SIZE;
|
||||||
int i, offset;
|
int i, offset;
|
||||||
String holder = null;
|
String holder = null;
|
||||||
|
@ -455,7 +455,7 @@ public class Stabs {
|
||||||
String infoField = sf.getTypeInformation();
|
String infoField = sf.getTypeInformation();
|
||||||
// According to the doc 't' can follow the 'T'
|
// According to the doc 't' can follow the 'T'
|
||||||
if (infoField.length() > 0 && infoField.charAt(0) == 't') {
|
if (infoField.length() > 0 && infoField.charAt(0) == 't') {
|
||||||
String s = infoField.substring(1);
|
//String s = infoField.substring(1);
|
||||||
parseStabString(requestor, field, value);
|
parseStabString(requestor, field, value);
|
||||||
} else {
|
} else {
|
||||||
// Just register the type.
|
// Just register the type.
|
||||||
|
@ -763,34 +763,34 @@ public class Stabs {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|
||||||
// get the width
|
// get the width
|
||||||
int width = 0;
|
//int width = 0;
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (c == ';') {
|
if (c == ';') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
}
|
}
|
||||||
try {
|
//try {
|
||||||
String token = sb.toString();
|
// String token = sb.toString();
|
||||||
width = Integer.parseInt(token);
|
// width = Integer.parseInt(token);
|
||||||
} catch (NumberFormatException e) {
|
//} catch (NumberFormatException e) {
|
||||||
}
|
//}
|
||||||
|
|
||||||
sb.setLength(0);
|
sb.setLength(0);
|
||||||
|
|
||||||
// get the offset
|
// get the offset
|
||||||
int offset = 0;
|
//int offset = 0;
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (c == ';') {
|
if (c == ';') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
}
|
}
|
||||||
try {
|
//try {
|
||||||
String token = sb.toString();
|
//String token = sb.toString();
|
||||||
offset = Integer.parseInt(token);
|
//offset = Integer.parseInt(token);
|
||||||
} catch (NumberFormatException e) {
|
//} catch (NumberFormatException e) {
|
||||||
}
|
//}
|
||||||
|
|
||||||
sb.setLength(0);
|
sb.setLength(0);
|
||||||
|
|
||||||
|
@ -823,18 +823,18 @@ public class Stabs {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|
||||||
// get the fp-Type
|
// get the fp-Type
|
||||||
int fpType = 0;
|
//int fpType = 0;
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (c == ';') {
|
if (c == ';') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
}
|
}
|
||||||
try {
|
//try {
|
||||||
String token = sb.toString();
|
// String token = sb.toString();
|
||||||
fpType = Integer.parseInt(token);
|
//fpType = Integer.parseInt(token);
|
||||||
} catch (NumberFormatException e) {
|
//} catch (NumberFormatException e) {
|
||||||
}
|
//}
|
||||||
|
|
||||||
sb.setLength(0);
|
sb.setLength(0);
|
||||||
|
|
||||||
|
@ -858,7 +858,8 @@ public class Stabs {
|
||||||
case 'c' :
|
case 'c' :
|
||||||
case 'g' :
|
case 'g' :
|
||||||
{
|
{
|
||||||
DebugType type = parseStabType(name, reader);
|
//DebugType type = parseStabType(name, reader);
|
||||||
|
parseStabType(name, reader);
|
||||||
int c = reader.read(); // semicolon
|
int c = reader.read(); // semicolon
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
int nbits = 0;
|
int nbits = 0;
|
||||||
|
@ -885,7 +886,8 @@ public class Stabs {
|
||||||
// we only understand range for an array.
|
// we only understand range for an array.
|
||||||
int c = reader.read();
|
int c = reader.read();
|
||||||
if (c == 'r') {
|
if (c == 'r') {
|
||||||
DebugType index_type = parseStabType("", reader); //$NON-NLS-1$
|
//DebugType index_type = parseStabType("", reader); //$NON-NLS-1$
|
||||||
|
parseStabType("", reader); //$NON-NLS-1$
|
||||||
|
|
||||||
c = reader.read();
|
c = reader.read();
|
||||||
// Check ';'
|
// Check ';'
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
package org.eclipse.cdt.utils.debug.tools;
|
package org.eclipse.cdt.utils.debug.tools;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
|
@ -302,7 +301,7 @@ public class DebugDump implements IDebugEntryRequestor {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
try {
|
try {
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
//ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
DebugDump dump = new DebugDump(System.out);
|
DebugDump dump = new DebugDump(System.out);
|
||||||
dump.parse(args[0]);
|
dump.parse(args[0]);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
@ -350,7 +350,7 @@ public class Elf {
|
||||||
} else if ( obj instanceof Long ) {
|
} else if ( obj instanceof Long ) {
|
||||||
Long val = (Long)obj;
|
Long val = (Long)obj;
|
||||||
anotherVal = val.longValue();
|
anotherVal = val.longValue();
|
||||||
thisVal = (long)this.st_value;
|
thisVal = this.st_value;
|
||||||
}
|
}
|
||||||
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
|
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
|
||||||
}
|
}
|
||||||
|
@ -1028,7 +1028,7 @@ public class Elf {
|
||||||
tmp[1] = (short)((val >> 8) & 0x00ff);
|
tmp[1] = (short)((val >> 8) & 0x00ff);
|
||||||
tmp[2] = (short)((val >> 16) & 0x00ff);
|
tmp[2] = (short)((val >> 16) & 0x00ff);
|
||||||
tmp[3] = (short)((val >> 24) & 0x00ff);
|
tmp[3] = (short)((val >> 24) & 0x00ff);
|
||||||
return (long)((tmp[0] << 24) + (tmp[1] << 16) + (tmp[2] << 8) + tmp[3]);
|
return ((tmp[0] << 24) + (tmp[1] << 16) + (tmp[2] << 8) + tmp[3]);
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class PTYInputStream extends InputStream {
|
||||||
byte b[] = new byte[1];
|
byte b[] = new byte[1];
|
||||||
if (1 != read(b, 0, 1))
|
if (1 != read(b, 0, 1))
|
||||||
return -1;
|
return -1;
|
||||||
return (int) b[0];
|
return b[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,7 +30,7 @@ class SpawnerInputStream extends InputStream {
|
||||||
byte b[] = new byte[1];
|
byte b[] = new byte[1];
|
||||||
if (1 != read(b, 0, 1))
|
if (1 != read(b, 0, 1))
|
||||||
return -1;
|
return -1;
|
||||||
return (int) b[0];
|
return b[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue