[Reproducers] Change how reproducers are initialized.
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 3 Dec 2018 17:28:29 +0000 (17:28 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 3 Dec 2018 17:28:29 +0000 (17:28 +0000)
commit15eacd741faa5ec75ef55d82db3486cbaf91f46f
tree4daa8934087c40d450d390c3fbee9c3b28b36bed
parent8918a511a1a53cc568b248428fb75c39b1949001
[Reproducers] Change how reproducers are initialized.

This patch changes the way the reproducer is initialized. Rather than
making changes at run time we now do everything at initialization time.
To make this happen we had to introduce initializer options and their SB
variant. This allows us to tell the initializer that we're running in
reproducer capture/replay mode.

Because of this change we also had to alter our testing strategy. We
cannot reinitialize LLDB when using the dotest infrastructure. Instead
we use lit and invoke two instances of the driver.

Another consequence is that we can no longer enable capture or replay
through commands. This was bound to go away form the beginning, but I
had something in mind where you could enable/disable specific providers.
However this seems like it adds very little value right now so the
corresponding commands were removed.

Finally this change also means you now have to control this through the
driver, for which I replaced --reproducer with --capture and --replay to
differentiate between the two modes.

Differential revision: https://reviews.llvm.org/D55038

llvm-svn: 348152
40 files changed:
lldb/include/lldb/API/SBDebugger.h
lldb/include/lldb/API/SBDefines.h
lldb/include/lldb/API/SBFileSpec.h
lldb/include/lldb/API/SBInitializerOptions.h [new file with mode: 0644]
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Host/HostInfoBase.h
lldb/include/lldb/Initialization/SystemInitializer.h
lldb/include/lldb/Initialization/SystemInitializerCommon.h
lldb/include/lldb/Initialization/SystemLifetimeManager.h
lldb/include/lldb/Utility/Reproducer.h
lldb/lit/Reproducer/Inputs/GDBRemoteCapture.in [new file with mode: 0644]
lldb/lit/Reproducer/Inputs/GDBRemoteReplay.in [new file with mode: 0644]
lldb/lit/Reproducer/Inputs/simple.c [new file with mode: 0644]
lldb/lit/Reproducer/TestDriverOptions.test [new file with mode: 0644]
lldb/lit/Reproducer/TestGDBRemoteRepro.test [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/reproducer/gdb-remote/Makefile [deleted file]
lldb/packages/Python/lldbsuite/test/functionalities/reproducer/gdb-remote/TestGdbRemoteReproducer.py [deleted file]
lldb/scripts/interface/SBDebugger.i
lldb/scripts/interface/SBInitializerOptions.i [new file with mode: 0644]
lldb/scripts/lldb.swig
lldb/source/API/CMakeLists.txt
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBInitializerOptions.cpp [new file with mode: 0644]
lldb/source/API/SystemInitializerFull.cpp
lldb/source/API/SystemInitializerFull.h
lldb/source/Commands/CommandObjectReproducer.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Host/common/HostInfoBase.cpp
lldb/source/Initialization/SystemInitializerCommon.cpp
lldb/source/Initialization/SystemLifetimeManager.cpp
lldb/source/Utility/Reproducer.cpp
lldb/tools/driver/Driver.cpp
lldb/tools/driver/Options.td
lldb/tools/lldb-server/SystemInitializerLLGS.cpp
lldb/tools/lldb-server/SystemInitializerLLGS.h
lldb/tools/lldb-server/lldb-server.cpp
lldb/tools/lldb-test/SystemInitializerTest.cpp
lldb/tools/lldb-test/SystemInitializerTest.h
lldb/tools/lldb-test/lldb-test.cpp
lldb/unittests/Utility/ReproducerTest.cpp