[Lldb-commits] [lldb] [lldb] Enable the use of dladdr() on Android (PR #124187)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 23 12:44:58 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

<details>
<summary>Changes</summary>

dladdr() was introduced 15 years ago.

---
Full diff: https://github.com/llvm/llvm-project/pull/124187.diff


1 Files Affected:

- (modified) lldb/source/Host/common/Host.cpp (-2) 


``````````diff
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 7b2bae74e196fe..fdb623667bc251 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -352,7 +352,6 @@ bool Host::ResolveExecutableInBundle(FileSpec &file) { return false; }
 
 FileSpec Host::GetModuleFileSpecForHostAddress(const void *host_addr) {
   FileSpec module_filespec;
-#if !defined(__ANDROID__)
   Dl_info info;
   if (::dladdr(host_addr, &info)) {
     if (info.dli_fname) {
@@ -360,7 +359,6 @@ FileSpec Host::GetModuleFileSpecForHostAddress(const void *host_addr) {
       FileSystem::Instance().Resolve(module_filespec);
     }
   }
-#endif
   return module_filespec;
 }
 

``````````

</details>


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


More information about the lldb-commits mailing list