Author: jdevlieghere Date: Tue Mar 5 17:49:57 2019 New Revision: 355470 URL: http://llvm.org/viewvc/llvm-project?rev=355470&view=rev Log: [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 Removed: lldb/trunk/lit/Reproducer/Inputs/FileReplay.in lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in Modified: lldb/trunk/lit/Reproducer/TestFileRepro.test lldb/trunk/lit/Reproducer/TestGDBRemoteRepro.test lldb/trunk/source/API/SBReproducer.cpp lldb/trunk/tools/driver/Driver.cpp Removed: lldb/trunk/lit/Reproducer/Inputs/FileReplay.in URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/Inputs/FileReplay.in?rev=355469&view=auto ============================================================================== --- lldb/trunk/lit/Reproducer/Inputs/FileReplay.in (original) +++ lldb/trunk/lit/Reproducer/Inputs/FileReplay.in (removed) @@ -1,2 +0,0 @@ -reproducer status -run Removed: lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in?rev=355469&view=auto ============================================================================== --- lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in (original) +++ lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in (removed) @@ -1,5 +0,0 @@ -reproducer status -breakpoint set -f simple.c -l 12 -run -bt -cont Modified: lldb/trunk/lit/Reproducer/TestFileRepro.test URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/TestFileRepro.test?rev=355470&r1=355469&r2=355470&view=diff ============================================================================== --- lldb/trunk/lit/Reproducer/TestFileRepro.test (original) +++ lldb/trunk/lit/Reproducer/TestFileRepro.test Tue Mar 5 17:49:57 2019 @@ -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 Modified: lldb/trunk/lit/Reproducer/TestGDBRemoteRepro.test URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/TestGDBRemoteRepro.test?rev=355470&r1=355469&r2=355470&view=diff ============================================================================== --- lldb/trunk/lit/Reproducer/TestGDBRemoteRepro.test (original) +++ lldb/trunk/lit/Reproducer/TestGDBRemoteRepro.test Tue Mar 5 17:49:57 2019 @@ -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 Modified: lldb/trunk/source/API/SBReproducer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBReproducer.cpp?rev=355470&r1=355469&r2=355470&view=diff ============================================================================== --- lldb/trunk/source/API/SBReproducer.cpp (original) +++ lldb/trunk/source/API/SBReproducer.cpp Tue Mar 5 17:49:57 2019 @@ -2901,8 +2901,6 @@ const char *SBReproducer::Replay(const c 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 c SBRegistry registry; registry.Replay(file); -#endif return nullptr; } Modified: lldb/trunk/tools/driver/Driver.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=355470&r1=355469&r2=355470&view=diff ============================================================================== --- lldb/trunk/tools/driver/Driver.cpp (original) +++ lldb/trunk/tools/driver/Driver.cpp Tue Mar 5 17:49:57 2019 @@ -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(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits