https://github.com/Jlalond updated 
https://github.com/llvm/llvm-project/pull/110885

>From 5ed6e20b50f70754efbaa157720a7ef120bb6b1e Mon Sep 17 00:00:00 2001
From: Jacob Lalonde <jalalo...@fb.com>
Date: Wed, 2 Oct 2024 09:50:26 -0700
Subject: [PATCH 1/4] Remove additional logic to disable the dynamic loader
 when the main executable already has a load address

---
 .../POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp         | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git 
a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index 51e4b3e6728f23..b9c0e174c3be68 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -108,21 +108,6 @@ void DynamicLoaderPOSIXDYLD::DidAttach() {
   // if we dont have a load address we cant re-base
   bool rebase_exec = load_offset != LLDB_INVALID_ADDRESS;
 
-  // if we have a valid executable
-  if (executable_sp.get()) {
-    lldb_private::ObjectFile *obj = executable_sp->GetObjectFile();
-    if (obj) {
-      // don't rebase if the module already has a load address
-      Target &target = m_process->GetTarget();
-      Address addr = obj->GetImageInfoAddress(&target);
-      if (addr.GetLoadAddress(&target) != LLDB_INVALID_ADDRESS)
-        rebase_exec = false;
-    }
-  } else {
-    // no executable, nothing to re-base
-    rebase_exec = false;
-  }
-
   // if the target executable should be re-based
   if (rebase_exec) {
     ModuleList module_list;

>From 071b7fac9f6eadf3c4c466146d429841f3ba1a86 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde <jalalo...@fb.com>
Date: Wed, 2 Oct 2024 11:28:10 -0700
Subject: [PATCH 2/4] Change the test that emits an invalid .so

---
 .../functionalities/postmortem/minidump-new/TestMiniDumpUUID.py | 2 --
 1 file changed, 2 deletions(-)

diff --git 
a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py 
b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
index 2a3d291086b662..b212426802cc57 100644
--- a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
+++ b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
@@ -327,8 +327,6 @@ def test_relative_module_name(self):
         old_cwd = os.getcwd()
         self.addTearDownHook(lambda: os.chdir(old_cwd))
         os.chdir(self.getBuildDir())
-        name = "file-with-a-name-unlikely-to-exist-in-the-current-directory.so"
-        open(name, "a").close()
         modules = self.get_minidump_modules(
             self.getSourcePath("relative_module_name.yaml")
         )

>From e4f0b83d3e599d5190e81e64f5d52d5a3b1a8ce4 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde <jalalo...@fb.com>
Date: Wed, 2 Oct 2024 11:36:14 -0700
Subject: [PATCH 3/4] Have to keep the name variable

---
 .../functionalities/postmortem/minidump-new/TestMiniDumpUUID.py  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py 
b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
index b212426802cc57..6f8427d67e5092 100644
--- a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
+++ b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
@@ -327,6 +327,7 @@ def test_relative_module_name(self):
         old_cwd = os.getcwd()
         self.addTearDownHook(lambda: os.chdir(old_cwd))
         os.chdir(self.getBuildDir())
+        name = "file-with-a-name-unlikely-to-exist-in-the-current-directory.so"
         modules = self.get_minidump_modules(
             self.getSourcePath("relative_module_name.yaml")
         )

>From 054c74cb6a52b3974762c0971dfb3a2bb72cdb06 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde <jalalo...@fb.com>
Date: Thu, 3 Oct 2024 10:36:19 -0700
Subject: [PATCH 4/4] Remove test change

---
 .../functionalities/postmortem/minidump-new/TestMiniDumpUUID.py  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py 
b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
index 6f8427d67e5092..2a3d291086b662 100644
--- a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
+++ b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
@@ -328,6 +328,7 @@ def test_relative_module_name(self):
         self.addTearDownHook(lambda: os.chdir(old_cwd))
         os.chdir(self.getBuildDir())
         name = "file-with-a-name-unlikely-to-exist-in-the-current-directory.so"
+        open(name, "a").close()
         modules = self.get_minidump_modules(
             self.getSourcePath("relative_module_name.yaml")
         )

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

Reply via email to