Using the approach described in [1] and suggested by Pavel D77588 , this patch introduces a new lldbconfig module that lives next to the lldb module. It makes it possible to make the lldb module configurable. More specifically it makes it possible to delay initializing the debugger, which is needed for testing the reproducer.
I chose to name the module lldbconfig rather than lldb.config because I thought it would be weird to import a "submodule" before the main module, but if anyone feels the other approach is more desirable I'd be happy to change it.
[1] https://stackoverflow.com/questions/3720740/pass-variable-on-import/39360070#39360070
If we're not going to ship this file, should we place it under packages/Python/... (I'm sure there is some place we could put it where it would already be in sys.path ? That way it would not be accessible from regular lldb runs, only for those from dotest, which would decrease the likelyhood of lldb suddenly stopping to work after being installed.