mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +02:00
check for core
This commit is contained in:
parent
f35c3e8644
commit
51ca3415af
6 changed files with 13 additions and 58 deletions
|
@ -385,7 +385,8 @@ public class CModelManager implements IResourceChangeListener {
|
|||
IBinaryFile bin = parser.getBinary(file);
|
||||
return (bin.getType() == IBinaryFile.EXECUTABLE
|
||||
|| bin.getType() == IBinaryFile.OBJECT
|
||||
|| bin.getType() == IBinaryFile.SHARED);
|
||||
|| bin.getType() == IBinaryFile.SHARED
|
||||
|| bin.getType() == IBinaryFile.CORE);
|
||||
} catch (IOException e) {
|
||||
//e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -587,6 +587,8 @@ public class Elf {
|
|||
public static final int ELF_TYPE_EXE = 1;
|
||||
public static final int ELF_TYPE_SHLIB = 2;
|
||||
public static final int ELF_TYPE_OBJ = 3;
|
||||
public static final int ELF_TYPE_CORE = 4;
|
||||
|
||||
String cpu;
|
||||
int type;
|
||||
boolean bDebug;
|
||||
|
@ -614,6 +616,9 @@ public class Elf {
|
|||
Attribute attrib = new Attribute();
|
||||
|
||||
switch( ehdr.e_type ) {
|
||||
case Elf.ELFhdr.ET_CORE:
|
||||
attrib.type = attrib.ELF_TYPE_CORE;
|
||||
break;
|
||||
case Elf.ELFhdr.ET_EXEC:
|
||||
attrib.type = attrib.ELF_TYPE_EXE;
|
||||
break;
|
||||
|
|
|
@ -132,6 +132,8 @@ public class BinaryPropertySource extends FilePropertySource {
|
|||
return "executable";
|
||||
} else if (binary.isSharedLib()) {
|
||||
return "shared library";
|
||||
} else if (binary.isCore()) {
|
||||
return "core file";
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -172,6 +172,8 @@ public class CElementImageProvider {
|
|||
return CPluginImages.DESC_OBJS_CEXEC;
|
||||
} else if (bin.isSharedLib()) {
|
||||
return CPluginImages.DESC_OBJS_SHLIB;
|
||||
} else if (bin.isCore()) {
|
||||
return CPluginImages.DESC_OBJS_CORE;
|
||||
}
|
||||
return CPluginImages.DESC_OBJS_BINARY;
|
||||
} else if (cfile.isTranslationUnit()) {
|
||||
|
|
|
@ -96,63 +96,6 @@ public class CElementLabelProvider extends LabelProvider {
|
|||
return fWorkbenchLabelProvider.getImage(element);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the image key for a c element.
|
||||
* @param The type of the element
|
||||
*/
|
||||
public static String getCElementImage(ICElement celement) {
|
||||
int type = celement.getElementType();
|
||||
switch (type) {
|
||||
case ICElement.C_CONTAINER:
|
||||
return CPluginImages.IMG_OBJS_CONTAINER;
|
||||
|
||||
case ICElement.C_FILE:
|
||||
ICFile cfile = (ICFile)celement;
|
||||
if (cfile.isArchive()) {
|
||||
return CPluginImages.IMG_OBJS_ARCHIVE;
|
||||
} else if (cfile.isBinary()) {
|
||||
IBinary bin = (IBinary)cfile;
|
||||
if (bin.isExecutable()) {
|
||||
if (bin.hasDebug())
|
||||
return CPluginImages.IMG_OBJS_CEXEC_DEBUG;
|
||||
return CPluginImages.IMG_OBJS_CEXEC;
|
||||
} else if (bin.isSharedLib()) {
|
||||
return CPluginImages.IMG_OBJS_SHLIB;
|
||||
}
|
||||
return CPluginImages.IMG_OBJS_BINARY;
|
||||
} else if (cfile.isTranslationUnit()) {
|
||||
return CPluginImages.IMG_OBJS_TUNIT;
|
||||
}
|
||||
break;
|
||||
|
||||
case ICElement.C_UNION:
|
||||
return CPluginImages.IMG_OBJS_UNION;
|
||||
|
||||
case ICElement.C_CLASS:
|
||||
return CPluginImages.IMG_OBJS_CLASS;
|
||||
|
||||
case ICElement.C_STRUCT:
|
||||
return CPluginImages.IMG_OBJS_STRUCT;
|
||||
|
||||
case ICElement.C_FIELD:
|
||||
case ICElement.C_VARIABLE:
|
||||
return CPluginImages.IMG_OBJS_FIELD;
|
||||
|
||||
case ICElement.C_FUNCTION:
|
||||
return CPluginImages.IMG_OBJS_FUNCTION;
|
||||
|
||||
case ICElement.C_FUNCTION_DECLARATION:
|
||||
return CPluginImages.IMG_OBJS_DECLARATION;
|
||||
|
||||
case ICElement.C_INCLUDE:
|
||||
return CPluginImages.IMG_OBJS_INCLUDE;
|
||||
|
||||
case ICElement.C_MACRO:
|
||||
return CPluginImages.IMG_OBJS_MACRO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IBaseLabelProvider#dispose()
|
||||
|
|
|
@ -57,6 +57,7 @@ public class CPluginImages {
|
|||
public static final String IMG_OBJS_SHLIB= NAME_PREFIX + "shlib_obj.gif";
|
||||
public static final String IMG_OBJS_CEXEC= NAME_PREFIX + "exec_obj.gif";
|
||||
public static final String IMG_OBJS_CEXEC_DEBUG= NAME_PREFIX + "exec_dbg_obj.gif";
|
||||
public static final String IMG_OBJS_CORE= NAME_PREFIX + "core_obj.gif";
|
||||
public static final String IMG_OBJS_CONTAINER= NAME_PREFIX + "container_obj.gif";
|
||||
|
||||
// Breakpoint images
|
||||
|
@ -78,6 +79,7 @@ public class CPluginImages {
|
|||
public static final ImageDescriptor DESC_OBJS_SHLIB= createManaged(T_OBJ, IMG_OBJS_SHLIB);
|
||||
public static final ImageDescriptor DESC_OBJS_CEXEC= createManaged(T_OBJ, IMG_OBJS_CEXEC);
|
||||
public static final ImageDescriptor DESC_OBJS_CEXEC_DEBUG= createManaged(T_OBJ, IMG_OBJS_CEXEC_DEBUG);
|
||||
public static final ImageDescriptor DESC_OBJS_CORE= createManaged(T_OBJ, IMG_OBJS_CORE);
|
||||
public static final ImageDescriptor DESC_OBJS_CONTAINER= createManaged(T_OBJ, IMG_OBJS_CONTAINER);
|
||||
|
||||
// Breakpoint image descriptors
|
||||
|
|
Loading…
Add table
Reference in a new issue