Skip to content

[lldb] Enable the use of dladdr() on Android #124187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Jan 23, 2025

dladdr() was introduced 15 years ago.

dladdr() was introduced 15 years ago.
@brad0 brad0 requested review from labath and enh-google January 23, 2025 20:44
@brad0 brad0 requested a review from JDevlieghere as a code owner January 23, 2025 20:44
@llvmbot llvmbot added the lldb label Jan 23, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 23, 2025

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

Changes

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 --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;
 }
 

@brad0 brad0 merged commit eda1699 into llvm:main Jan 24, 2025
9 checks passed
@brad0 brad0 deleted the lldb_android_dladdr branch January 24, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants