Hui added inline comments.

================
Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:810
+
+  std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
+
----------------
zturner wrote:
> Does this actually need to be a `recursive_mutex`?
I think there is access to the member 'm_filespec_ap'.


================
Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:862
+
+      // Note that at this moment we only have the base name of the dll.
+      m_filespec_ap->Append(FileSpec(dll_name_cstr, true));
----------------
Given no valid UUID for PECOFF for now,  you can't get a valid image based on a 
filename only. 
So if the exe target is filed on LLDB, its shared modules probably can't be 
appended to the target's image list **until the process is launched**. This 
makes it impossible for developers to lookup any symbol from the shared 
libraries or set any breakpoint by name to the shared libraries.

For example, 


```
$ ldd main.exe
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc5e070000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffc5ddb0000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffc5ad00000)
        DllB.dll => /c/DllB.dll (0x7ffc31450000)
        DllA.dll => /c/DllA.dll (0x7ffc2f7b0000)
```



```
./lldb.exe main.exe
(lldb) image list
[  0]                                                         C:\main.exe
```

However we expect 3 images at the moment (excluding windows system libraries)


```
./lldb.exe main.exe
(lldb) image list
[  0]                                                         C:\main.exe
[  1]                                                         C:\DllA.dll
[  2]                                                         C:\DllB.dll
```

So it will be better to have full path of the imported modules here.




Repository:
  rLLDB LLDB

https://reviews.llvm.org/D53094



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to