Parse an Object file. filename is the name of the Object file to be parsed. Returns true if the file is parsed without an error along with obj containing the pointer to the Dyn_Symtab class object. Returns false if there was an error.getLastSymtabError()/printSymtabError() should be called to find out the error details.
Parse a memory image.mem_image is the pointer to the Object file that is in memory to be parsed. size is the size of the memory image. Returns true if the file is parsed without an error along with obj containing the pointer to the Dyn_Symtab class object. Returns false if there was an error.getLastSymtabError()/printSymtabError() should be called to find out the error details.
Find and return a vector of symbols of the type sType where the name matches the given Mangled/Pretty name based on the isMangled flag. ret contains the symbols found if any. The return value is false if there is no such function name or else true is returned. For any other error that may occur a call to getLastSymtabError() should be made. If the isRegex flag is set a regular expression match is done with the symbol names. checkCase is used only if isRegex has been set and indicates if we have to ignore case while matching names.
If the module with the name name exists return true with ret containing the module else return false.
Find and return the function symbol with the given offset entry address. If none exists return a false.
Add a new symbol newsym to all of the internal data structures. The name of the newsym must be a mangled name. Returns true if it was successfully added.
Return all the Symbols of type sType in the object file. Returns true if there is atleast one function with ret containing the symbols.
Return all the Modules in the object file. Returns true if there is atleast one Module with ret containing the Modules.
Returns true if the Object is an executable else returns false.
Returns true if the given offset address where is within the text section else returns false.
Returns true if the given offset address where is within the Data section else returns false.
Returns true if the given offset address where is a valid address(aligned address/isCode/isData) else returns false.
Return the full path name of the object file. Empty if it is a memory image.
Return the name(not the full path) of the object file. Empty if its a memory image.
Return the pointer to the object file in memory. Null if its a file on disk and not a memory image.
Return the code/data Offset values for the Object.
Return the code/data length values for the Object.
Return the code/data section pointer the Object.
Return the number of symbols in the object file.
Get the exception block in the Object file at offset addr. Returns false if there is no exception block at the given offset else returns true with excp containing the Dyn_ExceptionBlock.
Returns true if the Address range addr -> addr+size contains a catch block, with excp pointing to the appropriate block.
Get all the exception blocks in the Object file. Returns false if there are no exception blocks else returns true with exceptions containing a vector of Dyn_ExceptionBlocks.
Returns the address width of the object file.
Returns the address of the load section of the object file.
Returns the virtual address of the entry point of the object file.
Returns the base address of the object file.
SymtabError can take one of the following values.
- Obj_Parsing - An error occured during object parsing(internal error)
- Syms_To_Functions - An error occured in converting symbols to functions(internal error)
- Build_Function_Lists - An error occured while building function Lists(internal error)
- No_Such_Function - No such function exists with the given inputs
- No_Such_Variable - No such Variable exists with the given inputs
- No_Such_Module - No such Module exists with the given inputs
- No_Such_Symbol - No such symbol exists with the given inputs
- No_Such_Member - No such Member exists in the archive with the given inputs
- Not_A_File - Object File to be parsed may be an archive and not a file
- Not_An_Archive - Object File to be parsed is not an archive
Returns the last error that occurred while parsing.
Returns a detailed description of the enum value serr.
supportedLanguages can take one of the following values.
- lang_Unknown
- lang_Assembly
- lang_C
- lang_CPlusPlus
- lang_GnuCPlusPlus
- lang_Fortran
- lang_Fortran_with_pretty_debug
- lang_CMFortran
Get all symbols in the module with type sType. Returns true if there is atleast one symbol in the module.
Find and return a vector of symbols of the type sType in the module where the name matches the given Mangled/Pretty name based on the isMangled flag. ret contains the symbols found. The return value is false if there is no such function name or else true is returned. For any other error that may occur a call to getLastSymtabError() should be made. If the isRegex flag is set a regular expression match is done with the function names. checkCase is used only if isRegex has been set and indicates if we have to ignore case while matching names.
Return if the module is shared.
Return the full Name/ file Name for the module.
Set the full name of the module to newName.
Get the language for the module/ set it to lang.
Get the offset address for the module.
Create an object of class Dyn_Symbol with the mangled name name, module module, the symbol type stype, the symbol linkage slinkage, the section sec, the size size and a void pointer upPtr. The void pointer can be used to store any data in the symbol. This is particularly useful when converting between Dyn_Symbol to any other object.
Copy constructor for the Dyn_Symbol class;
Compare the Dyn_Symbol with sym;
Return the appropriate data members of the Class Dyn_Symbol.
Change the Module wo which the symbol belongs to module.
Change the Module name of the symbol to moduleName.
Change the size of the symbol to ns.
Change the Address of the symbol to newAddr.
Set the type of the symbol to sType.
Set the upPtr of the symbol to newUpPtr.
Add a mangled name name to the symbol. If isPrimaryis true then make it the defualt name for the symbol. This function also updates the internal data structures accordingly.
Add a pretty name name to the symbol. If isPrimaryis true then make it the defualt name for the symbol. This function also updates the internal data structures accordingly.
Add a typed name name to the symbol. If isPrimaryis true then make it the defualt name for the symbol. This function also updates the internal data structures accordingly.
Find if the symbol is weak or not.
Find if the symbol linkage is local or not.
Find if the symbol linkage is global or not.
Create an object of type Dyn_Archive for the archive with name name. Returns true if the file is an archive with img containing the Dyn_Archive object.
Create an object of type Dyn_Archive for the archive in memory with memory pointer mem_image and size size. Returns true if the memory image is an archive with img containing the Dyn_Archive object.
Get the member object handle if at all the member exists in the archive. Returns false if the member with name member_name does not exist else returns true with img containing the member's corresponding Dyn_Symtab Object.
Get the member's object handle which is at the OFFSET memberOffset in the Archive. Returns true if it succeeds with img containing the member's corresponding Dyn_Symtab Object.
Get all the member object handles in the archive. Returns true if succeeds with members containing the Dyn_Symtab Objects for all the members in the archive.
Return if the Member with name member_name exists in the archive.
Returns the last error that occurred while parsing the archive.
Returns a detailed description of the enum value serr.