[Lldb-commits] [PATCH] D77662: [WIP][lldb/test] Make TestLoadUnload compatible with windows
Adrian McCarthy via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 7 14:10:52 PDT 2020
amccarth added a comment.
I like where this is going.
================
Comment at: lldb/packages/Python/lldbsuite/test/make/dylib.h:50
+ FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char *)&msg, 0, NULL);
+ return msg;
----------------
This leaks the buffer allocated for the message. I guess we don't expect this to happen often, so maybe that's not a big deal, and it's a terrible API to have to deal with.
================
Comment at: lldb/test/API/functionalities/load_unload/TestLoadUnload.py:209
+ env_cmd_string = "settings set target.env-vars " + self.dylibPath + "=" + self.getBuildArtifact(".")
+ self.runCmd(env_cmd_string)
+
----------------
The env_cmd_string is going to eliminate ALL of the environment variables for the target except the one(s) that it explicitly sets. Is that what you intended?
The lldb help says:
> Warning: The 'set' command re-sets the entire array or dictionary. If you just want to add, remove or update individual values (or add something to the end), use one of the other settings sub-commands: append, replace, insert-before or insert-after.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77662/new/
https://reviews.llvm.org/D77662
More information about the lldb-commits
mailing list