Hi tfiala, clayborg,
I was tracking a problem where llgs on linux would not pick up any environment
variables. On OSX there is a virtual function PlatformDarwin::GetEnvironment()
which correctly sets up the list of environment variables. On linux llgs it
defaults to a base class default implementation which clears the list.
I moved the OSX implementation down to PlatformPOSIX. This fixes my problem
on linux still works properly on OSX.
http://reviews.llvm.org/D5486
Files:
source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
source/Plugins/Platform/MacOSX/PlatformDarwin.h
source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
source/Plugins/Platform/POSIX/PlatformPOSIX.h
Index: source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===================================================================
--- source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1212,17 +1212,6 @@
return bp_sp;
}
-size_t
-PlatformDarwin::GetEnvironment (StringList &env)
-{
- if (IsRemote())
- {
- if (m_remote_platform_sp)
- return m_remote_platform_sp->GetEnvironment(env);
- return 0;
- }
- return Host::GetEnvironment(env);
-}
int32_t
PlatformDarwin::GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info)
Index: source/Plugins/Platform/MacOSX/PlatformDarwin.h
===================================================================
--- source/Plugins/Platform/MacOSX/PlatformDarwin.h
+++ source/Plugins/Platform/MacOSX/PlatformDarwin.h
@@ -78,9 +78,6 @@
virtual bool
ModuleIsExcludedForNonModuleSpecificSearches (lldb_private::Target &target, const lldb::ModuleSP &module_sp);
- virtual size_t
- GetEnvironment (lldb_private::StringList &environment);
-
bool
ARMGetSupportedArchitectureAtIndex (uint32_t idx, lldb_private::ArchSpec &arch);
Index: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
===================================================================
--- source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -634,6 +634,18 @@
return false;
}
+size_t
+PlatformPOSIX::GetEnvironment (StringList &env)
+{
+ if (IsRemote())
+ {
+ if (m_remote_platform_sp)
+ return m_remote_platform_sp->GetEnvironment(env);
+ return 0;
+ }
+ return Host::GetEnvironment(env);
+}
+
bool
PlatformPOSIX::GetRemoteOSKernelDescription (std::string &s)
{
Index: source/Plugins/Platform/POSIX/PlatformPOSIX.h
===================================================================
--- source/Plugins/Platform/POSIX/PlatformPOSIX.h
+++ source/Plugins/Platform/POSIX/PlatformPOSIX.h
@@ -101,6 +101,9 @@
lldb_private::ArchSpec
GetRemoteSystemArchitecture () override;
+ virtual size_t
+ GetEnvironment (lldb_private::StringList &environment);
+
bool
IsConnected () const override;
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits