Skip to content

Commit

Permalink
Remove deprecated binary parsers and supporting code
Browse files Browse the repository at this point in the history
These binary parsers have been slated for deleting for
a while and are replaced with 64-bit compatible
versions.

Some methods still refereneced the 32-bit variants
and have been updated to the fully functioning
64-bit variant.

The older parser IDs are preserved (forever?) so that
old projects can be opened without needing to do anything.
The IDs now point at the new implementations.

See also Bug 562495
  • Loading branch information
jonahgraham committed Nov 8, 2022
1 parent 14dfefd commit 9026f53
Show file tree
Hide file tree
Showing 30 changed files with 68 additions and 6,191 deletions.
63 changes: 38 additions & 25 deletions NewAndNoteworthy/CHANGELOG-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This section describes API removals that occurred in past releases, and upcoming
- [Rework of API to determine GDB command line in org.eclipse.cdt.dsf.gdb](#gdbBackendDebuggerCommandLine)
- [Removal of Qt plug-ins and features](#qt-plugins)
- [Removal of constructor org.eclipse.cdt.utils.coff.CodeViewReader(RandomAccessFile, int, boolean)](#CodeViewReader-constructor-removal)
- [Removal of 32-bit Binary parsers with 64-bit replacements](#32bitbinaryparsers)

## API Changes in CDT 10.5.0

Expand Down Expand Up @@ -172,6 +173,43 @@ accepts filename and opens a RandomAccessFile.

See https://github.com/eclipse-cdt/cdt/pull/132

### <span id="32bitbinaryparsers">Removal of 32-bit Binary parsers with 64-bit replacements</span>

The following binary parser classes have been removed, mostly due to these versions not supporting 64-bit variants of the binary files.
The new 64-bit parsers support both 32 and 64 bit files and can be identified by the same name class followed by `64`.

- org.eclipse.cdt.utils.coff.Coff
- org.eclipse.cdt.utils.coff.PE
- org.eclipse.cdt.utils.coff.PEArchive
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryArchive
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryExecutable
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryObject
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryShared
- org.eclipse.cdt.utils.coff.parser.CygwinPEParser
- org.eclipse.cdt.utils.coff.parser.CygwinSymbol
- org.eclipse.cdt.utils.coff.parser.PEBinaryArchive
- org.eclipse.cdt.utils.coff.parser.PEBinaryExecutable
- org.eclipse.cdt.utils.coff.parser.PEBinaryObject
- org.eclipse.cdt.utils.coff.parser.PEBinaryShared
- org.eclipse.cdt.utils.coff.parser.PEParser
- org.eclipse.cdt.utils.macho.MachO
- org.eclipse.cdt.utils.macho.MachOHelper
- org.eclipse.cdt.utils.macho.parser.MachOBinaryArchive
- org.eclipse.cdt.utils.macho.parser.MachOBinaryExecutable
- org.eclipse.cdt.utils.macho.parser.MachOBinaryObject
- org.eclipse.cdt.utils.macho.parser.MachOBinaryShared
- org.eclipse.cdt.utils.macho.parser.MachOParser

In addition the following methods have been removed due to there existing a 64-bit compatible version.

- org.eclipse.cdt.utils.debug.dwarf.Dwarf.Dwarf(PE), use Dwarf(PE64) constructor instead
- org.eclipse.cdt.utils.debug.dwarf.Dwarf.init(PE), use init(PE64) method instead
- org.eclipse.cdt.utils.debug.dwarf.DwarfReader.DwarfReader(PE), use DwarfReader(PE64) constructor instead
- org.eclipse.cdt.utils.debug.dwarf.DwarfReader.init(PE), use init(PE64) method instead
- org.eclipse.cdt.utils.debug.stabs.Stabs.init(PE), use init(PE64) method instead

See https://github.com/eclipse-cdt/cdt/pull/135

---

## API Changes in CDT 10.5.0.
Expand Down Expand Up @@ -481,31 +519,6 @@ See the [policy](../POLICY.md) for the details.

## API Removals after June 2022

### <span id="binaryparsers">32-bit Binary parsers with 64-bit replacements</span>

The following binary parser classes have replacements, mostly due to
these versions not supporting 64-bit variants of the binary files. The
new 64-bit parsers support both 32 and 64 bit files.

- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryArchive
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryExecutable
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryObject
- org.eclipse.cdt.utils.coff.parser.CygwinPEBinaryShared
- org.eclipse.cdt.utils.coff.parser.CygwinPEParser
- org.eclipse.cdt.utils.coff.parser.CygwinSymbol
- org.eclipse.cdt.utils.coff.parser.PEBinaryArchive
- org.eclipse.cdt.utils.coff.parser.PEBinaryExecutable
- org.eclipse.cdt.utils.coff.parser.PEBinaryObject
- org.eclipse.cdt.utils.coff.parser.PEBinaryShared
- org.eclipse.cdt.utils.coff.parser.PEParser
- org.eclipse.cdt.utils.macho.parser.MachOBinaryArchive
- org.eclipse.cdt.utils.macho.parser.MachOBinaryExecutable
- org.eclipse.cdt.utils.macho.parser.MachOBinaryObject
- org.eclipse.cdt.utils.macho.parser.MachOBinaryShared
- org.eclipse.cdt.utils.macho.parser.MachOParser

See [Bug 562495](https://bugs.eclipse.org/bugs/show_bug.cgi?id=562495).

### <span id="baudrate">BaudRate enum in org.eclipse.cdt.serial</span>

The BaudRate enum in org.eclipse.cdt.serial package will be removed. The
Expand Down
2 changes: 1 addition & 1 deletion build/org.eclipse.cdt.autotools.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
</tool>
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.MachO64;org.eclipse.cdt.core.PE;org.eclipse.cdt.core.Cygwin_PE"
binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.MachO64;org.eclipse.cdt.core.PE64;org.eclipse.cdt.core.Cygwin_PE64"
id="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform"
isAbstract="false"
name="%Autotools.targetplatform.name"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,6 @@ public static Test suite() {
public void test3xStdMakeProject() {
String PROJ_NAME = "std_cpp_1";

// String[] BIN_PARSERS = new String[]{
// "org.eclipse.cdt.core.ELF",
// "org.eclipse.cdt.core.PE",
// "org.eclipse.cdt.core.GNU_ELF",
// "org.eclipse.cdt.core.MachO"
// };
//
// String[] ERR_PARSERS = new String[]{
// "org.eclipse.cdt.core.CWDLocator",
// "org.eclipse.cdt.core.GASErrorParser",
// "org.eclipse.cdt.core.VCErrorParser",
// "org.eclipse.cdt.core.GmakeErrorParser",
// };

IProject project = loadStdProject(PROJ_NAME);
projList.add(project);

Expand Down
24 changes: 19 additions & 5 deletions core/org.eclipse.cdt.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@
</cextension>
</extension>
<!-- Deprecated as of CDT 6.9. Use 64 bit version PEParser64 instead.
This class is planned for removal in next major release. -->
The class associated with this parser is now the 64-bit handling version. -->
<extension
id="PE"
name="%PEWindowsParser.name"
point="org.eclipse.cdt.core.BinaryParser">
<cextension>
<filter
name = "visibility"
value = "private">
</filter>
<run
class="org.eclipse.cdt.utils.coff.parser.PEParser">
class="org.eclipse.cdt.utils.coff.parser.PEParser64">
</run>
</cextension>
</extension>
Expand All @@ -95,14 +99,18 @@
</cextension>
</extension>
<!-- Deprecated as of CDT 6.9. Use 64 bit version CygwinPEParser64 instead.
This class is planned for removal in next major release. -->
The class associated with this parser is now the 64-bit handling version. -->
<extension
id="Cygwin_PE"
name="%CygwinPEParser.name"
point="org.eclipse.cdt.core.BinaryParser">
<cextension>
<filter
name = "visibility"
value = "private">
</filter>
<run
class="org.eclipse.cdt.utils.coff.parser.CygwinPEParser">
class="org.eclipse.cdt.utils.coff.parser.CygwinPEParser64">
</run>
</cextension>
</extension>
Expand Down Expand Up @@ -152,13 +160,19 @@
</run>
</cextension>
</extension>
<!-- Deprecated. Use 64 bit version CygwinPEParser64 instead.
The class associated with this parser is now the 64-bit handling version. -->
<extension
id="MachO"
name="%MachOParser.name"
point="org.eclipse.cdt.core.BinaryParser">
<cextension>
<filter
name = "visibility"
value = "private">
</filter>
<run
class="org.eclipse.cdt.utils.macho.parser.MachOParser">
class="org.eclipse.cdt.utils.macho.parser.MachOParser64">
</run>
</cextension>
</extension>
Expand Down
Loading

0 comments on commit 9026f53

Please sign in to comment.