[Reproducers] Enable replay from SBRepro.

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
This commit is contained in:
Jonas Devlieghere 2019-03-06 01:49:57 +00:00
parent 7e23df4437
commit 2e3e65fb62
6 changed files with 5 additions and 15 deletions

View File

@ -1,2 +0,0 @@
reproducer status
run

View File

@ -1,5 +0,0 @@
reproducer status
breakpoint set -f simple.c -l 12
run
bt
cont

View 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

View 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

View 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;
}

View 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();