Skip to content

Conversation

@brad0
Copy link
Contributor

@brad0 brad0 commented Jan 28, 2025

No description provided.

@brad0 brad0 requested review from enh-google and labath January 28, 2025 03:18
@brad0 brad0 requested a review from JDevlieghere as a code owner January 28, 2025 03:18
@llvmbot llvmbot added the lldb label Jan 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

Changes

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

1 Files Affected:

  • (modified) lldb/source/Host/posix/ProcessLauncherPosixFork.cpp (-6)
diff --git a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
index 7d856954684c49..f983305f3f3919 100644
--- a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
+++ b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
@@ -231,12 +231,6 @@ MakeForkActions(const ProcessLaunchInfo &info) {
 }
 
 static Environment::Envp FixupEnvironment(Environment env) {
-#ifdef __ANDROID__
-  // If there is no PATH variable specified inside the environment then set the
-  // path to /system/bin. It is required because the default path used by
-  // execve() is wrong on android.
-  env.try_emplace("PATH", "/system/bin");
-#endif
   return env.getEnvp();
 }
 

Copy link
Collaborator

@labath labath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete the FixupEnvironment function as well (replace it with a direct env.getEnvp() call) -- it only exists to hide the android hack.

@enh-google
Copy link
Contributor

Let's delete the FixupEnvironment function as well (replace it with a direct env.getEnvp() call) -- it only exists to hide the android hack.

+1 --- seems weird to say "fix up" when doing nothing. otherwise lgtm...

@github-actions
Copy link

github-actions bot commented Jan 29, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@brad0 brad0 requested a review from labath January 29, 2025 02:51
@brad0 brad0 merged commit 9326633 into llvm:main Jan 29, 2025
7 checks passed
@brad0 brad0 deleted the lldb_android branch January 29, 2025 08:21
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