[Lldb-commits] [lldb] Improve the executable name detection in ELF core files. (PR #197341)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Sat May 16 01:47:29 PDT 2026


slydiman wrote:

TestLinuxCore.py", line 345:
```
        # Copy linux-i386.out to lldb_i386_object_map/a.out
        tmp_object_map_root = os.path.join(self.getBuildDir(), "lldb_i386_object_map")
        executable = os.path.join(tmp_object_map_root, "a.out")
        lldbutil.mkdir_p(os.path.dirname(executable))
        shutil.copyfile("linux-i386.out", executable)

        # Replace the original module path at /home/labath/test and load the core
        self.runCmd("settings set target.object-map /home/labath/test {}".format(tmp_object_map_root))

        target = self.dbg.CreateTarget(None)
        process = target.LoadCore("linux-i386.core")

        # Check that we did load the mapped executable
        exe_module_spec = process.GetTarget().GetModuleAtIndex(0).GetFileSpec()
        self.assertTrue(exe_module_spec.fullpath.startswith(tmp_object_map_root))
```
The values on Windows are:
exe_module_spec = /home/labath/test/a.out
tmp_object_map_root = D:\build-dir\lldb-test-build.noindex\functionalities\postmortem\elf-core\TestLinuxCore\lldb_i386_object_map

Something is totally wrong here.
I'm going to revert this patch on Monday to unblock CI.

https://github.com/llvm/llvm-project/pull/197341


More information about the lldb-commits mailing list