diff --git a/core/org.eclipse.cdt.core/.settings/.api_filters b/core/org.eclipse.cdt.core/.settings/.api_filters new file mode 100644 index 00000000000..5506da6485d --- /dev/null +++ b/core/org.eclipse.cdt.core/.settings/.api_filters @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java index 350ac74009e..42b333ec169 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java @@ -23,7 +23,7 @@ import org.eclipse.core.runtime.IPath; */ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryObject { - protected ISymbol[] NO_SYMBOLS = new ISymbol[0]; + protected static final ISymbol[] NO_SYMBOLS = new ISymbol[0]; public class BinaryObjectInfo { public long bss; diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java index f787daa4496..31d627c7a62 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java @@ -37,7 +37,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject { private Addr2line symbolLoadingAddr2line; private CPPFilt symbolLoadingCPPFilt; long starttime; - + /** * @param parser * @param path @@ -103,7 +103,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject { } return null; } - + protected CPPFilt getCPPFilt() { IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class); if (factory != null) { @@ -143,7 +143,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject { return stream; } - + /* (non-Javadoc) * @see org.eclipse.cdt.utils.elf.parser.ElfBinaryObject#loadSymbols(org.eclipse.cdt.utils.elf.ElfHelper) */ @@ -151,20 +151,23 @@ public class GNUElfBinaryObject extends ElfBinaryObject { protected void loadSymbols(ElfHelper helper) throws IOException { symbolLoadingAddr2line = getAddr2line(false); symbolLoadingCPPFilt = getCPPFilt(); - super.loadSymbols(helper); - if (symbolLoadingAddr2line != null) { - symbolLoadingAddr2line.dispose(); - symbolLoadingAddr2line = null; - } - if (symbolLoadingCPPFilt != null) { - symbolLoadingCPPFilt.dispose(); - symbolLoadingCPPFilt = null; + try { + super.loadSymbols(helper); + } finally { + if (symbolLoadingAddr2line != null) { + symbolLoadingAddr2line.dispose(); + symbolLoadingAddr2line = null; + } + if (symbolLoadingCPPFilt != null) { + symbolLoadingCPPFilt.dispose(); + symbolLoadingCPPFilt = null; + } } } - + /* * (non-Javadoc) - * + * * @see org.eclipse.cdt.utils.elf.parser.ElfBinaryObject#addSymbols(org.eclipse.cdt.utils.elf.Elf.Symbol[], * int, java.util.List) */ @@ -205,7 +208,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject { /* * (non-Javadoc) - * + * * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class) */ @SuppressWarnings("rawtypes")