1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

minor tweaks bin obj

Change-Id: Ib2a5463bc71f05358a137c1c2bb547fd5577e8e9
This commit is contained in:
Alena Laskavaia 2015-11-05 09:18:58 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 67f78c8094
commit 75aa6665a0
3 changed files with 35 additions and 15 deletions

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.cdt.core" version="2">
<resource path="utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java" type="org.eclipse.cdt.utils.BinaryObjectAdapter">
<filter comment="NO_SYMBOLS array should be final" id="388100214">
<message_arguments>
<message_argument value="org.eclipse.cdt.utils.BinaryObjectAdapter"/>
<message_argument value="NO_SYMBOLS"/>
</message_arguments>
</filter>
<filter comment="NO_SYMBOLS array should be static" id="388108357">
<message_arguments>
<message_argument value="org.eclipse.cdt.utils.BinaryObjectAdapter"/>
<message_argument value="NO_SYMBOLS"/>
</message_arguments>
</filter>
</resource>
</component>

View file

@ -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;

View file

@ -151,14 +151,17 @@ 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;
}
}
}