================
@@ -1492,6 +1492,84 @@ def test_exe_name_extraction_nt_prpsinfo(self):
self.dbg.DeleteTarget(target)
+ @skipIfLLVMTargetMissing("X86")
+ @skipIfWindows
+ def test_uuid_info_from_nt_file_and_gnu_build_id(self):
+ # This test loads a core file that has everything it needs in core
+ # memory to read the r_debug structure to get the shared library list
+ # and also the NT_FILE note where we are able to find the UUID for
+ # any library. Prior to this patch, the UUID for any library could
+ # be found in ProcessElfCore::FindModuleUUID(...) only for an
+ # executable if the resolved path found in NT_FILE matched the path
+ # that the dynamic loader used, which can often be different due to
+ # symlinks.
+ #
+ # This test verifies that ProcessElfCore::FindModuleUUID() is able to
+ # find the UUID for a library even if the resolved path (NT_FILE)
+ # does not match the path that the dynamic loader used.
+ #
+ # The libraries in this core file have the following paths:
+ # R_DEBUG NT_FILE
+ # ============================ ======================================
+ # /lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.0.29
+ # /lib64/libm.so.6 /usr/lib64/libm.so.6
+ # /lib64/libgcc_s.so.1 /usr/lib64/libgcc_s-11-20240719.so.1
+ # /lib64/libc.so.6 /usr/lib64/libc.so.6
+ # /lib64/ld-linux-x86-64.so.2 /usr/lib64/ld-linux-x86-64.so.2
+ #
+ # The UUID map in ProcessELFCore is keyed off of the path from the
+ # NT_FILE info, so we verify that the new code that was added to
+ # ProcessELFCore::FindModuleUUID(...) can locate the module using the
+ # load address in the ModuleSpec that is now being passed to
+ # Process::FindModuleUUID(...).
+ yaml_path = self.getSourcePath("elf-dyld-nt-file-mismatch.yaml")
+ core_path = self.getBuildArtifact("elf-dyld-nt-file-mismatch.core")
+ log_path = self.getBuildArtifact("elf-dyld-nt-file-mismatch.log")
+ self.yaml2obj(yaml_path, core_path)
+ target = self.dbg.CreateTarget(None)
+ self.runCmd(f"log enable lldb process -f '{log_path}'")
+ # Disable parallel module loading as it can deadlock as there are
+ # issues with this feature that are not resolved.
+ self.runCmd(f"settings set target.parallel-module-load false")
----------------
youngd007 wrote:
I believe this is the relevant change @clayborg ?
Could we actually better align this test with Meta internally?
(lldb) settings show target.preload-symbols
target.preload-symbols (boolean) = false
(lldb) settings show target.parallel-module-load
target.parallel-module-load (boolean) = true
I would rather this test catch an issue that would burn our dependency on this
PR's fixed code. And currently we have parallel module loading TRUE while
preloading is false.
https://github.com/llvm/llvm-project/pull/206601
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits