Class CodeObjectUnitUtil
java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.CodeObjectUnitUtil
Utility routines for
ICodeObjectUnit.-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ISymbolInformation> findAllSymbolsByName(ICodeObjectUnit unit, String name) Get all symbols with given namestatic List<ISymbolInformation> findAllSymbolsByRelativeAddress(ICodeObjectUnit unit, long rva) Get all symbols for given relative virtual address.static ISymbolInformationfindExportedSymbolByName(ICodeObjectUnit unit, String name) Find an exported symbol by name.static ISymbolInformationfindImportedSymbolByName(ICodeObjectUnit unit, String name) Find an imported symbol by name.static ISegmentInformationfindSectionByName(ICodeObjectUnit unit, String name) Find a section by name.static ISegmentInformationfindSectionByRelativeAddress(ICodeObjectUnit unit, long rva) Find section covering the given relative virtual address.static ISegmentInformationfindSegmentByName(ICodeObjectUnit unit, String name) Find a segment by name.static ISegmentInformationfindSegmentByRelativeAddress(ICodeObjectUnit unit, long rva) Get segments covering the given relative virtual address.static ISymbolInformationfindSymbolByName(ICodeObjectUnit unit, String name) Get first symbol with given namestatic INativeCodeUnit<?> Get unique native code child if it exists, null otherwise.static booleanhasSymbolsAtRelativeAddress(ICodeObjectUnit unit, long rva) Determine whether symbols exist at the provided relative virtual address.
-
Method Details
-
findSymbolByName
Get first symbol with given name- Parameters:
unit- code object unitname- symbol name- Returns:
- first symbol with given name, null if none
-
findAllSymbolsByName
Get all symbols with given name- Parameters:
unit- code object unitname- symbol name- Returns:
- symbols with given name, empty list if none
-
findAllSymbolsByRelativeAddress
public static List<ISymbolInformation> findAllSymbolsByRelativeAddress(ICodeObjectUnit unit, long rva) Get all symbols for given relative virtual address.- Parameters:
unit- code object unitrva- relative virtual address- Returns:
- symbols for given relative virtual address, empty list if none
-
hasSymbolsAtRelativeAddress
Determine whether symbols exist at the provided relative virtual address.- Parameters:
unit- code object unitrva- relative virtual address- Returns:
- true if at least one symbol exists at the address
-
findExportedSymbolByName
Find an exported symbol by name.- Parameters:
unit- code object unitname- symbol name- Returns:
- exported symbol, or null if none
-
findImportedSymbolByName
Find an imported symbol by name.- Parameters:
unit- code object unitname- symbol name- Returns:
- imported symbol, or null if none
-
findSectionByName
Find a section by name.- Parameters:
unit- code object unitname- section name- Returns:
- section information, or null if none
-
findSegmentByName
Find a segment by name.- Parameters:
unit- code object unitname- segment name- Returns:
- segment information, or null if none
-
findSectionByRelativeAddress
Find section covering the given relative virtual address.- Parameters:
unit- code object unitrva- relative virtual address- Returns:
- section information, or null if none
-
findSegmentByRelativeAddress
Get segments covering the given relative virtual address.- Parameters:
unit- code object unitrva- relative virtual address- Returns:
- segment information, or null if none
-
getUniqueNativeCodeUnitChild
Get unique native code child if it exists, null otherwise.- Parameters:
unit- code object unit- Returns:
- the unique native code unit child, or null if none or ambiguous
-