[Reproducers] Enable replay from SBRepro.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 6 Mar 2019 01:49:57 +0000 (01:49 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 6 Mar 2019 01:49:57 +0000 (01:49 +0000)
Now that the LLDB instrumentation macros are in place, we should use
that to test reproducer replay.

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

llvm-svn: 355470

lldb/lit/Reproducer/Inputs/FileReplay.in [deleted file]
lldb/lit/Reproducer/Inputs/GDBRemoteReplay.in [deleted file]
lldb/lit/Reproducer/TestFileRepro.test
lldb/lit/Reproducer/TestGDBRemoteRepro.test
lldb/source/API/SBReproducer.cpp
lldb/tools/driver/Driver.cpp

diff --git a/lldb/lit/Reproducer/Inputs/FileReplay.in b/lldb/lit/Reproducer/Inputs/FileReplay.in
deleted file mode 100644 (file)
index 2ed2de1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-reproducer status
-run
diff --git a/lldb/lit/Reproducer/Inputs/GDBRemoteReplay.in b/lldb/lit/Reproducer/Inputs/GDBRemoteReplay.in
deleted file mode 100644 (file)
index efbb797..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-reproducer status
-breakpoint set -f simple.c -l 12
-run
-bt
-cont
index b33f39e..281a01a 100644 (file)
@@ -7,9 +7,9 @@
 # that the string "testing" is not printed.
 
 # RUN: %clang %S/Inputs/simple.c -g -o %t.out
-# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in --capture %t.repro -- %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in --capture %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
 # RUN: rm %t.out
-# RUN: %lldb -x -b -s %S/Inputs/FileReplay.in --replay %t.repro -- %t.out | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
 
 # CAPTURE: testing
 # REPLAY-NOT: testing
index e254705..6fbda6c 100644 (file)
@@ -7,8 +7,8 @@
 # that the string "testing" is not printed.
 
 # RUN: %clang %S/Inputs/simple.c -g -o %t.out
-# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture %t.repro -- %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
-# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteReplay.in --replay %t.repro -- %t.out | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
 
 # CHECK: Breakpoint 1
 # CHECK: Process {{.*}} stopped
index db132e6..ba08055 100644 (file)
@@ -2901,8 +2901,6 @@ const char *SBReproducer::Replay(const char *path) {
     return error.c_str();
   }
 
-  // FIXME: Enable the following code once the SB reproducer has landed.
-#if 0
   FileSpec file = loader->GetFile<SBInfo>();
   if (!file) {
     error = "unable to get replay data from reproducer.";
@@ -2911,7 +2909,6 @@ const char *SBReproducer::Replay(const char *path) {
 
   SBRegistry registry;
   registry.Replay(file);
-#endif
 
   return nullptr;
 }
index 8845cb1..ad61142 100644 (file)
@@ -905,7 +905,7 @@ main(int argc, char const *argv[])
       WithColor::error() << "reproducer replay failed: " << error << '\n';
       return 1;
     }
-    // FIXME: Return once SBReproducer::Replay actually performs the replay.
+    return 0;
   }
 
   SBError error = SBDebugger::InitializeWithErrorHandling();