[Lldb-commits] [PATCH] D56237: Implement GetLoadAddress for the Windows process plugin

Hui Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 4 08:24:56 PST 2019


Hui added inline comments.


================
Comment at: source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp:82
+  // Second, try through the underlying platform.
+  load_addr = Host::GetProcessBaseAddress(m_process->GetID());
+  if (load_addr != LLDB_INVALID_ADDRESS)
----------------
labath wrote:
> Hui wrote:
> > Shall not come to this point for a remote process. Need to bail out ahead.
> Yes, but what's the reason for the fallback in the first place? ProcessWindows is already by definition on the host, so you could do the same work in ProcessWindows::GetFileLoadAddress (but I'm not saying you should, since that information should already be known through ProcessWindows, as it received it through the windows debug api in OnLoadDLL ).
Server other lldb-server.exe could respond with a bogus address to qFileLoadAddress packet and then lldb (on host) will come to this point and result in the case you mentioned.

>  since then this code will not be correct for remote processes (it will just randomly pick up some data from the local process with the same pid, if you happen to have one)
> 





CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56237/new/

https://reviews.llvm.org/D56237





More information about the lldb-commits mailing list