[Lldb-commits] [lldb] [lldb] Remove PATH workaround for Android (PR #124682)
Brad Smith via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 28 19:56:46 PST 2025
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/124682
>From fa2ef2fb98942b4d0f52c441f29fa48063b314b4 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Mon, 27 Jan 2025 22:16:53 -0500
Subject: [PATCH] [lldb] Remove PATH workaround for Android
---
lldb/source/Host/posix/ProcessLauncherPosixFork.cpp | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
index 7d856954684c49..3e956290c3055a 100644
--- a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
+++ b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
@@ -230,16 +230,6 @@ MakeForkActions(const ProcessLaunchInfo &info) {
return result;
}
-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();
-}
-
ForkLaunchInfo::ForkLaunchInfo(const ProcessLaunchInfo &info)
: separate_process_group(
info.GetFlags().Test(eLaunchFlagLaunchInSeparateProcessGroup)),
@@ -247,8 +237,7 @@ ForkLaunchInfo::ForkLaunchInfo(const ProcessLaunchInfo &info)
disable_aslr(info.GetFlags().Test(eLaunchFlagDisableASLR)),
wd(info.GetWorkingDirectory().GetPath()),
argv(info.GetArguments().GetConstArgumentVector()),
- envp(FixupEnvironment(info.GetEnvironment())),
- actions(MakeForkActions(info)) {}
+ envp(info.GetEnvironment().getEnvp()), actions(MakeForkActions(info)) {}
HostProcess
ProcessLauncherPosixFork::LaunchProcess(const ProcessLaunchInfo &launch_info,
More information about the lldb-commits
mailing list