clayborg added inline comments.

================
Comment at: tools/debugserver/source/debugserver.cpp:1426
+    for (i = 0; (env_entry = host_env[i]) != NULL; ++i)
+      remote->Context().PushEnvironment(env_entry);
+  }
----------------
We need to check if the env var is already in the environment in 
remote->Context() first before pushing the new version. I would assume that if 
you exec a program with an env like:
```
FOO=bar
USER=me
FOO=baz
```

That FOO=baz will end up being the value that is used. If the user specifies 
things with --env, we will just overwrite it. We might add a 
PushEnvironmentIfNeeded() function to the Context() class that will make sure 
it isn't in the list first and push it only if needed.


https://reviews.llvm.org/D41352



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to