Skip to content

Commit

Permalink
Process ELF files without file suffix as binary content
Browse files Browse the repository at this point in the history
  • Loading branch information
jld01 committed Jun 9, 2023
1 parent 501e7db commit c91d0f7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/org.eclipse.cdt.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
Bundle-Version: 8.2.0.qualifier
Bundle-Version: 8.2.100.qualifier
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
8 changes: 5 additions & 3 deletions core/org.eclipse.cdt.core/plugin.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2003, 2014 IBM Corporation and others.
# Copyright (c) 2003, 2023 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -12,6 +12,7 @@
# IBM Corporation - initial API and implementation
# Anton Leherbauer (Wind River Systems)
# Martin Oberhuber (Wind River) - [303083] Split out the Spawner
# John Dallaway - Add ELF file content type (#409)
###############################################################################
pluginName=C/C++ Development Tools Core
providerName=Eclipse CDT
Expand Down Expand Up @@ -41,8 +42,8 @@ CTaskName=C/C++ Task

IndexerMarker=Indexer Marker

ElfParser.name=Elf Parser
GNUElfParser.name=GNU Elf Parser
ElfParser.name=ELF Parser
GNUElfParser.name=GNU ELF Parser
PEWindowsParser.name=PE Windows Parser (Deprecated)
PE64WindowsParser.name=PE64 Windows Parser
GNUPE64WindowsParser.name=GNU PE64 Windows Parser
Expand Down Expand Up @@ -100,6 +101,7 @@ cxxSourceName=C++ Source File
cxxHeaderName=C++ Header File
asmSourceName=Assembly Source File
binaryFileName=Binary File
elfFileName=ELF File

cdt_pathentry_var.description=CDT PathEntry variable
config_name_var.description=The name of the active configuration for the project specified as an argument
Expand Down
26 changes: 24 additions & 2 deletions core/org.eclipse.cdt.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,30 @@
</super>
</extension>

<!-- =================================================================================== -->
<!-- Binary file content types -->
<!-- =================================================================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
id="binaryFile"
name="%binaryFileName"
priority="high"/>
<content-type
base-type="org.eclipse.cdt.core.binaryFile"
id="elfFile"
name="%elfFileName"
priority="low">
<describer
class="org.eclipse.core.runtime.content.BinarySignatureDescriber"
plugin="org.eclipse.core.contenttype">
<parameter name="signature" value="7F 45 4C 46"/>
</describer>
</content-type>
<file-association
content-type="org.eclipse.cdt.core.elfFile"
file-patterns="[^.]+"/> <!-- no file extension -->
</extension>

<!-- =================================================================================== -->
<!-- .cproject Content Type -->
<!-- =================================================================================== -->
Expand Down Expand Up @@ -603,8 +627,6 @@
base-type="org.eclipse.core.runtime.text"
file-extensions="S,s,asm,ASM"
priority="high"/>
<content-type id="binaryFile" name="%binaryFileName"
priority="high"/>
</extension>

<!-- The reserved filenames by the C++ standard -->
Expand Down

0 comments on commit c91d0f7

Please sign in to comment.