Skip to content

Commit

Permalink
[Reproducers] Enable replay from SBRepro.
Browse files Browse the repository at this point in the history
Now that the LLDB instrumentation macros are in place, we should use
that to test reproducer replay.

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@355470 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
JDevlieghere committed Mar 6, 2019
1 parent 467ce5f commit 2727205
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 15 deletions.
2 changes: 0 additions & 2 deletions lit/Reproducer/Inputs/FileReplay.in

This file was deleted.

5 changes: 0 additions & 5 deletions lit/Reproducer/Inputs/GDBRemoteReplay.in

This file was deleted.

4 changes: 2 additions & 2 deletions lit/Reproducer/TestFileRepro.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lit/Reproducer/TestGDBRemoteRepro.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions source/API/SBReproducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand All @@ -2911,7 +2909,6 @@ const char *SBReproducer::Replay(const char *path) {

SBRegistry registry;
registry.Replay(file);
#endif

return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2727205

Please sign in to comment.