diff --git a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF index f70c45851ef..6224785337c 100644 --- a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF @@ -137,7 +137,6 @@ Require-Bundle: org.eclipse.cdt.core.native;bundle-version="[6.2.0,7.0.0)";visib org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: javax.xml.bind;version="[2.3.3,3.0.0)" Automatic-Module-Name: org.eclipse.cdt.core Service-Component: OSGI-INF/*.xml diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java index 45da86f9aac..20564a52723 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java @@ -28,8 +28,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.xml.bind.DatatypeConverter; - import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICompileOptionsFinder; import org.eclipse.cdt.core.ISymbolReader; @@ -127,7 +125,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions } // The build-id location is taken by converting the binary bytes to hex string. // The first byte is used as a directory specifier (e.g. 51/a4578fe2). - String bName = DatatypeConverter.printHexBinary(byteArray).toLowerCase(); + String bName = printHexBinary(byteArray).toLowerCase(); buildId = bName.substring(0, 2) + "/" + bName.substring(2) + ".debug"; //$NON-NLS-1$ //$NON-NLS-2$ // The build-id file should be in the special directory /usr/lib/debug/.build-id IPath buildIdPath = new Path("/usr/lib/debug/.build-id").append(buildId); //$NON-NLS-1$ @@ -288,6 +286,13 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions m_parsed = false; } + private static String printHexBinary(byte[] byteArray) { + StringBuilder sb = new StringBuilder(byteArray.length * 2); + for (byte b : byteArray) + sb.append(String.format("%02x", b)); //$NON-NLS-1$ + return sb.toString(); + } + /* * Parse line table data of a compilation unit to get names of all source files * that contribute to the compilation unit.