Package org.eclipse.cdt.utils.elf.parser
Class ElfBinaryObject
- java.lang.Object
-
- org.eclipse.core.runtime.PlatformObject
-
- org.eclipse.cdt.utils.BinaryFile
-
- org.eclipse.cdt.utils.BinaryObjectAdapter
-
- org.eclipse.cdt.utils.elf.parser.ElfBinaryObject
-
- All Implemented Interfaces:
IBinaryParser.IBinaryFile,IBinaryParser.IBinaryObject,org.eclipse.core.runtime.IAdaptable
- Direct Known Subclasses:
ElfBinaryExecutable,ElfBinaryShared,GNUElfBinaryObject
public class ElfBinaryObject extends BinaryObjectAdapter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.cdt.utils.BinaryObjectAdapter
BinaryObjectAdapter.BinaryObjectInfo
-
-
Field Summary
-
Fields inherited from class org.eclipse.cdt.utils.BinaryObjectAdapter
NO_SYMBOLS
-
Fields inherited from interface org.eclipse.cdt.core.IBinaryParser.IBinaryFile
ARCHIVE, CORE, EXECUTABLE, OBJECT, SHARED
-
-
Constructor Summary
Constructors Constructor Description ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, int type)ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, AR.ARHeader h)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddSymbols(Elf.Symbol[] array, int type, java.util.List<Symbol> list)<T> TgetAdapter(java.lang.Class<T> adapter)IAddressFactorygetAddressFactory()protected BinaryObjectAdapter.BinaryObjectInfogetBinaryObjectInfo()java.io.InputStreamgetContents()java.lang.StringgetCPU()CPU nameprotected ElfHelpergetElfHelper()java.lang.StringgetName()The name of the objectIBinaryParser.ISymbol[]getSymbols()Symbols of the objectbooleanisLittleEndian()The endianprotected voidloadAll()protected voidloadInfo()protected voidloadInfo(ElfHelper helper)protected voidloadSymbols(ElfHelper helper)-
Methods inherited from class org.eclipse.cdt.utils.BinaryObjectAdapter
getBSS, getData, getNeededSharedLibs, getSoName, getSymbol, getText, hasDebug, toString
-
Methods inherited from class org.eclipse.cdt.utils.BinaryFile
getBinaryParser, getPath, getType, hasChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.cdt.core.IBinaryParser.IBinaryFile
getBinaryParser, getPath, getType
-
-
-
-
Constructor Detail
-
ElfBinaryObject
public ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, AR.ARHeader h)
-
ElfBinaryObject
public ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, int type)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:IBinaryParser.IBinaryObjectThe name of the object- Specified by:
getNamein interfaceIBinaryParser.IBinaryObject- Overrides:
getNamein classBinaryObjectAdapter- Returns:
- String
- See Also:
IBinaryParser.IBinaryObject.getName()
-
getContents
public java.io.InputStream getContents() throws java.io.IOException- Specified by:
getContentsin interfaceIBinaryParser.IBinaryFile- Overrides:
getContentsin classBinaryFile- Returns:
- the binary contents.
- Throws:
java.io.IOException- See Also:
IBinaryParser.IBinaryFile.getContents()
-
getSymbols
public IBinaryParser.ISymbol[] getSymbols()
Description copied from interface:IBinaryParser.IBinaryObjectSymbols of the object- Specified by:
getSymbolsin interfaceIBinaryParser.IBinaryObject- Specified by:
getSymbolsin classBinaryObjectAdapter- Returns:
- ISymbol[] arrays of symbols
- See Also:
IBinaryParser.IBinaryObject.getSymbols()
-
getBinaryObjectInfo
protected BinaryObjectAdapter.BinaryObjectInfo getBinaryObjectInfo()
- Specified by:
getBinaryObjectInfoin classBinaryObjectAdapter
-
getElfHelper
protected ElfHelper getElfHelper() throws java.io.IOException
- Throws:
java.io.IOException
-
loadAll
protected void loadAll() throws java.io.IOException- Throws:
java.io.IOException
-
loadInfo
protected void loadInfo() throws java.io.IOException- Throws:
java.io.IOException
-
loadInfo
protected void loadInfo(ElfHelper helper) throws java.io.IOException
- Throws:
java.io.IOException
-
loadSymbols
protected void loadSymbols(ElfHelper helper) throws java.io.IOException
- Throws:
java.io.IOException
-
addSymbols
protected void addSymbols(Elf.Symbol[] array, int type, java.util.List<Symbol> list)
-
getAdapter
public <T> T getAdapter(java.lang.Class<T> adapter)
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable- Overrides:
getAdapterin classorg.eclipse.core.runtime.PlatformObject
-
getAddressFactory
public IAddressFactory getAddressFactory()
- Specified by:
getAddressFactoryin interfaceIBinaryParser.IBinaryObject- Specified by:
getAddressFactoryin classBinaryObjectAdapter
-
isLittleEndian
public boolean isLittleEndian()
Description copied from interface:IBinaryParser.IBinaryObjectThe endian- Specified by:
isLittleEndianin interfaceIBinaryParser.IBinaryObject- Overrides:
isLittleEndianin classBinaryObjectAdapter- Returns:
- boolean - true for little endian
- See Also:
IBinaryParser.IBinaryObject.isLittleEndian()
-
getCPU
public java.lang.String getCPU()
Description copied from interface:IBinaryParser.IBinaryObjectCPU name- Specified by:
getCPUin interfaceIBinaryParser.IBinaryObject- Overrides:
getCPUin classBinaryObjectAdapter- Returns:
- String - cpu name
- See Also:
IBinaryParser.IBinaryObject.getCPU()
-
-