[Lldb-commits] [PATCH] D19603: Fix entry point lookup for ObjectFilePECOFF.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 27 13:53:18 PDT 2016


clayborg added a comment.

Let me clarify a few things. A "file address" is an address (lldb::addr_t) that gets translated into a section + offset address (lldb_private::Address which contains a lldb_private::Section + offset. Any addresses coming from ObjectFile parsers must be made into lldb_private::Address objects. As you load shared libraries and executables the dynamic loader plugins will tell the lldb_private::Target where all sections are loaded. So the slide is automatically applied to the section offset address. So you will make "m_entry_point_address" into something that says ".text + 0x123". If we ever want to use this address so set a breakpoint, we will resolve the lldb_private::Address into a "load address" (also a lldb::addr_t), but we will ask the target for foo.exe's ".text" load address, and we will get some slide address like 0x12340000 and then the load address would be "0x12340000 + 0x123", or 0x12340123. So each object file must encode their addresses correctly. Does that make more sense?


http://reviews.llvm.org/D19603





More information about the lldb-commits mailing list