summaryrefslogtreecommitdiffstats
path: root/lldb/scripts
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-12-03 17:28:29 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-12-03 17:28:29 +0000
commit15eacd741faa5ec75ef55d82db3486cbaf91f46f (patch)
tree4daa8934087c40d450d390c3fbee9c3b28b36bed /lldb/scripts
parent8918a511a1a53cc568b248428fb75c39b1949001 (diff)
downloadbcm5719-llvm-15eacd741faa5ec75ef55d82db3486cbaf91f46f.tar.gz
bcm5719-llvm-15eacd741faa5ec75ef55d82db3486cbaf91f46f.zip
[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
Diffstat (limited to 'lldb/scripts')
-rw-r--r--lldb/scripts/interface/SBDebugger.i6
-rw-r--r--lldb/scripts/interface/SBInitializerOptions.i24
-rw-r--r--lldb/scripts/lldb.swig1
3 files changed, 28 insertions, 3 deletions
diff --git a/lldb/scripts/interface/SBDebugger.i b/lldb/scripts/interface/SBDebugger.i
index 18796e80e55..fde3d7b6b88 100644
--- a/lldb/scripts/interface/SBDebugger.i
+++ b/lldb/scripts/interface/SBDebugger.i
@@ -124,6 +124,9 @@ public:
Initialize();
static void
+ Initialize(lldb::SBInitializerOptions& options);
+
+ static void
Terminate();
static lldb::SBDebugger
@@ -376,9 +379,6 @@ public:
const char *
GetReproducerPath() const;
- lldb::SBError
- ReplayReproducer (const char *path);
-
lldb::ScriptLanguage
GetScriptLanguage() const;
diff --git a/lldb/scripts/interface/SBInitializerOptions.i b/lldb/scripts/interface/SBInitializerOptions.i
new file mode 100644
index 00000000000..9478642ebd6
--- /dev/null
+++ b/lldb/scripts/interface/SBInitializerOptions.i
@@ -0,0 +1,24 @@
+//===-- SWIG Interface for SBInitializerOptions -----------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBInitializerOptions
+{
+public:
+ SBInitializerOptions ();
+ SBInitializerOptions (const lldb::SBInitializerOptions &rhs);
+ ~SBInitializerOptions();
+
+ void SetCaptureReproducer(bool b);
+ void SetReplayReproducer(bool b);
+ void SetReproducerPath(const char* path);
+};
+
+} // namespace lldb
diff --git a/lldb/scripts/lldb.swig b/lldb/scripts/lldb.swig
index e920718d3e8..e8553d075d4 100644
--- a/lldb/scripts/lldb.swig
+++ b/lldb/scripts/lldb.swig
@@ -187,6 +187,7 @@ import six
%include "./interface/SBFrame.i"
%include "./interface/SBFunction.i"
%include "./interface/SBHostOS.i"
+%include "./interface/SBInitializerOptions.i"
%include "./interface/SBInstruction.i"
%include "./interface/SBInstructionList.i"
%include "./interface/SBLanguageRuntime.i"
OpenPOWER on IntegriCloud