[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In https://reviews.llvm.org/D41352#959051, @jasonmolenda wrote: > I guess I don't have an opinion on this one. The correct way to pass > environment variables to the inferior is through > SBLaunchInfo::SetEnvironmentEntries or in cmd line lldb, process launch -v > ENV=

[Lldb-commits] [PATCH] D40079: Make sure DataBufferLLVM contents are writable

2017-12-19 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 127500. labath added a comment. It took a while, but we've finally landed an llvm::WritableMemoryBuffer class. This patch now becomes simple, as all I need to do is use that instead of the MemoryBuffer class. Well.. almost. The new class does not have the null

[Lldb-commits] [PATCH] D41359: Add Utility/Environment class for handling... environments

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Thanks for the explanation. Good to go. https://reviews.llvm.org/D41359 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. So the main question is what do we expect to happen by default. I kind of agree that if we launch the inferior directly when launching I would expect the environment to be passed along. Jason: since we always just launch debugserver for Xcode in the mode that doesn't e

[Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:394 + if (name_str.find_first_of("[]?*.-+\\") != std::string::npos) +FindTypesByRegex(RegularExpression(name_str), max_matches, types); else You should make the Re

[Lldb-commits] [PATCH] D40079: Make sure DataBufferLLVM contents are writable

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. See inlined comment. Quick fix and this will be good to go. Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:409-410 if (!data_sp) { -data_sp

[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. Thanks for the background Pavel. I'm fine with changing the default behavior. I don't see this having any impact on users of debugserver, and if it does, we can add a flag like G

[Lldb-commits] [lldb] r321095 - Temporarily XFAIL test/functionalities/exec while investiagting bot breakage.

2017-12-19 Thread Adrian Prantl via lldb-commits
Author: adrian Date: Tue Dec 19 10:21:28 2017 New Revision: 321095 URL: http://llvm.org/viewvc/llvm-project?rev=321095&view=rev Log: Temporarily XFAIL test/functionalities/exec while investiagting bot breakage. When building with cmake on green gragon or on ci.swift.org, this test fails. rdar://

[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. The existing code for the "--forward-env" does this: case 'F': // Pass the current environment down to the process that gets launched { char **host_env = *_NSGetEnviron(); char *env_entry; size_t i; for (i = 0; (env_entry = host_env[i])

[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. So we can also specify extra environment variable using the "--env" option with debugserver and your current fix will break that. https://reviews.llvm.org/D41352

[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Environment vars might be set by using --env, so those need to go into "inferior_envp" first. If we are launching, we will copy only the host environment vars that haven't been already set manually (they don't already exist in the inferior_envp). https://reviews.llvm

[Lldb-commits] [PATCH] D41352: debugserver: Propagate environment in launch-mode (pr35671)

2017-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. This is exposing a bug where if we have options like: % debugserver --env USER=hello --forward-env -- /bin/ls -lAF We would set USER to hello, then "--forward-env" would clobber the setting... https://reviews.llvm.org/D41352 __

[Lldb-commits] [lldb] r321120 - Fix a couple of warnings (NFC)

2017-12-19 Thread Adrian Prantl via lldb-commits
Author: adrian Date: Tue Dec 19 14:54:37 2017 New Revision: 321120 URL: http://llvm.org/viewvc/llvm-project?rev=321120&view=rev Log: Fix a couple of warnings (NFC) Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp lldb/trunk/source/Plugins/Process/gdb-remote/G

[Lldb-commits] [lldb] r321123 - Replace an accidentally added "break" with an LLVM_FALLTHROUGH.

2017-12-19 Thread Adrian Prantl via lldb-commits
Author: adrian Date: Tue Dec 19 15:16:38 2017 New Revision: 321123 URL: http://llvm.org/viewvc/llvm-project?rev=321123&view=rev Log: Replace an accidentally added "break" with an LLVM_FALLTHROUGH. Thanks to Greg Clayton for catchting this! Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger

[Lldb-commits] [PATCH] D41427: [lldb] Fix crash when parsing the type of a function without any arguments

2017-12-19 Thread Aaron Smith via Phabricator via lldb-commits
asmith created this revision. asmith added reviewers: zturner, lldb-commits. For `int main()`, the number of arguments is zero. Trying to access the element of a null array causes trouble. Repository: rL LLVM https://reviews.llvm.org/D41427 Files: source/Plugins/SymbolFile/PDB/PDBASTParse

[Lldb-commits] [PATCH] D41428: [lldb] This commit adds support to cache a PDB's global scope and fixes a bug in getting the source file name for a compiland

2017-12-19 Thread Aaron Smith via Phabricator via lldb-commits
asmith created this revision. asmith added reviewers: zturner, lldb-commits. This commit is a combination of following changes: (1) Cache PDB's global scope(executable) in SymbolFilePDB (2) Change naming of `cu` to `compiland` which is PDB specific (3) Change ParseCompil

[Lldb-commits] [PATCH] D41092: Enable more abilities in SymbolFilePDB

2017-12-19 Thread Aaron Smith via Phabricator via lldb-commits
asmith updated this revision to Diff 127658. asmith added a comment. If a `Symbols` table is present then lldb can retrieve symbols for the types listed in PDBSym_Type. In other words, if we want symbolic information for a function then checking for the `Symbols` table is sufficient. Repositor