[Lldb-commits] [PATCH] Fetch object file load address if it isn't specified by the linker

Oleksiy Vyalov ovyalov at google.com
Tue Jun 16 16:43:05 PDT 2015


Please see my comments.


================
Comment at: include/lldb/Target/Process.h:3040
@@ +3039,3 @@
+    virtual Error
+    GetFileLoadAddress(const FileSpec& file, lldb::addr_t& load_addr)
+    {
----------------
Nit - I'd rather call it GetModuleLoadAddress in order to underscore that it's not a regular file.


================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:113
@@ -112,3 +112,3 @@
 {
     RegisterMemberFunctionHandler(StringExtractorGDBRemote::eServerPacketType_C,
                                   &GDBRemoteCommunicationServerLLGS::Handle_C);
----------------
Do we need to call RegisterMemberFunctionHandler on Handle_qFileLoadAddress?

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2607
@@ +2606,3 @@
+    // Fail if we don't have a current process.
+    if (!m_debugged_process_sp ||
+            m_debugged_process_sp->GetID () == LLDB_INVALID_PROCESS_ID)
----------------
labath wrote:
> I am wondering whether we shouldn't thread the implementation of this down to NativeProcessLinux. Parsing of files in the proc filesystem is unlikely to be fruitful on non-linux systems...
+1

================
Comment at: source/Utility/StringExtractorGDBRemote.h:64
@@ -63,2 +63,3 @@
         eServerPacketType_qGetWorkingDir,
+        eServerPacketType_qFileLoadAddress,
         eServerPacketType_QEnvironment,
----------------
Please update docs/lldb-gdb-remote.txt with new command description.

http://reviews.llvm.org/D10490

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list