[DynInst_API:] [SymtabAPI] Question regarding object files


Date: Tue, 30 Jun 2015 11:50:01 -0400
From: Tony Zhang <yifanyzhang@xxxxxxxxx>
Subject: [DynInst_API:] [SymtabAPI] Question regarding object files
Hello,

Iâm writing a toy program to test the symtabAPI. I have a question regarding the API description below : 

static bool openFile(Symtab *&obj, string filename) Creates a new Symtab object for an object file on disk. This object serves as a handle to the parsed object file. filename represents the name of the Object file to be parsed. The Symtab object is returned in obj if the parsing succeeds. Returns true if the file is parsed without an error, else returns false. getLastSymtabError() and printError() should be called to get more error details. 

static bool openFile(Symtab *&obj, char *mem_image, size_t size, std::string name) This factory method creates a new Symtab object for an object file in memory. This object serves as a handle to the parsed object file. mem_image represents the pointer to the Object file in memory 13 to be parsed. size indicates the size of the image. name specifies the name we will give to the parsed object. The Symtab object is returned in obj if the parsing succeeds. Returns true if the file is parsed without an error, else returns false. getLastSymtabError() and printError() should be called to get more error details.

What is the difference between âobject file on diskâ and âobject file in memory"? Do these refer to an object file vs a currently running process?

Thank you,
Tony



[← Prev in Thread] Current Thread [Next in Thread→]