Page MenuHomePhabricator

[Windows] Introduce a switch for the `lldb-server` mode on Windows
ClosedPublic

Authored by aleksandr.urakov on Sep 30 2019, 10:43 PM.

Details

Summary

This patch introduces a switch, based on the environment variable LLDB_USE_LLDB_SERVER, to determine whether to use the ProcessWindows plugin (the old way) or the lldb-server way for debugging on Windows.

Diff Detail

Event Timeline

labath accepted this revision.Oct 1 2019, 4:38 AM

Sounds reasonable. Thanks for doing this.

This revision is now accepted and ready to land.Oct 1 2019, 4:38 AM

Why an environment variable rather than a command line option?

I've made it in the way similar to Zachary have made for the SymbolFileNativePDB plugin. An environment variable could be more convenient e.g. to run a bunch of tests using the lldb-test option.

I've made it in the way similar to Zachary have made for the SymbolFileNativePDB plugin. An environment variable could be more convenient e.g. to run a bunch of tests using the lldb-test option.

I'm sorry, sure I mean the lldb-server option.

I've made it in the way similar to Zachary have made for the SymbolFileNativePDB plugin. An environment variable could be more convenient e.g. to run a bunch of tests using the lldb-test option.

The environment variable for using the native PDB was always intended to be temporary, since the native PDB reader would eventually be the only PDB reader.

In general, I find environment variables harder to manage (especially on Windows) than command line options. They're invisible global variables that compound all the environmental issues that make building and testing so flaky and hard to diagnose.

labath added a comment.Oct 2 2019, 8:42 AM

The environment variable for using the native PDB was always intended to be temporary, since the native PDB reader would eventually be the only PDB reader.

I don't know whether that's good or bad, but I think this variable is precisely the same kind of "temporary" as the other one. :)

amccarth accepted this revision.Oct 8 2019, 2:15 PM

Given Pavel's comment, this LGTM.

Hello! I am sorry for a delay with reply, I was OOO. Thanks all for the review!

This revision was automatically updated to reflect the committed changes.