[lldb-dev] How should target.inherit-env for for remote processes?

Greg Clayton gclayton at apple.com
Fri Feb 20 13:07:39 PST 2015


We currently fetch this from the platform. From Target.cpp:


    void
    GetHostEnvironmentIfNeeded () const
    {
        if (!m_got_host_env)
        {
            if (m_target)
            {
                m_got_host_env = true;
                const uint32_t idx = ePropertyInheritEnv;
                if (GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0))
                {
                    PlatformSP platform_sp (m_target->GetPlatform());
                    if (platform_sp)
                    {
                        StringList env;
                        if (platform_sp->GetEnvironment(env))
                        {
                            OptionValueDictionary *env_dict = GetPropertyAtIndexAsOptionValueDictionary (NULL, ePropertyEnvVars);
                            if (env_dict)
                            {


This should be renamed to GetInheritEnvironmentIfNeeded() since it isn't the host environment. So as long as your platform correctly gets the environment, we should be good.


> On Feb 15, 2015, at 12:23 AM, Vince Harron <vharron at google.com> wrote:
> 
> I don't think it makes sense for them to inherit the host environemnt, makes no sense.
> 
> They should probably inhert the environment of lldb-platform/llgs.
> 
> Vince
> 
> 
> -- 
> 
> Vince Harron |	 Technical Lead Manager |	 vharron at google.com |	 858-442-0868
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list