180814287SRaphael Isemann //===-- SBReproducer.cpp --------------------------------------------------===//
258947cf8SJonas Devlieghere //
3023f9998SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4023f9998SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
5023f9998SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
658947cf8SJonas Devlieghere //
758947cf8SJonas Devlieghere //===----------------------------------------------------------------------===//
858947cf8SJonas Devlieghere
91755f5b1SJonas Devlieghere #include "lldb/API/SBReproducer.h"
1058947cf8SJonas Devlieghere #include "lldb/API/LLDB.h"
1158947cf8SJonas Devlieghere #include "lldb/API/SBAddress.h"
1258947cf8SJonas Devlieghere #include "lldb/API/SBAttachInfo.h"
1358947cf8SJonas Devlieghere #include "lldb/API/SBBlock.h"
1458947cf8SJonas Devlieghere #include "lldb/API/SBBreakpoint.h"
1558947cf8SJonas Devlieghere #include "lldb/API/SBCommandInterpreter.h"
164b354039SJonas Devlieghere #include "lldb/API/SBCommandInterpreterRunOptions.h"
1758947cf8SJonas Devlieghere #include "lldb/API/SBData.h"
1858947cf8SJonas Devlieghere #include "lldb/API/SBDebugger.h"
1958947cf8SJonas Devlieghere #include "lldb/API/SBDeclaration.h"
2058947cf8SJonas Devlieghere #include "lldb/API/SBError.h"
2158947cf8SJonas Devlieghere #include "lldb/API/SBFileSpec.h"
2258947cf8SJonas Devlieghere #include "lldb/API/SBHostOS.h"
2358947cf8SJonas Devlieghere #include "lldb/Host/FileSystem.h"
241755f5b1SJonas Devlieghere #include "lldb/Utility/Instrumentation.h"
251755f5b1SJonas Devlieghere #include "lldb/Version/Version.h"
2658947cf8SJonas Devlieghere
2758947cf8SJonas Devlieghere using namespace lldb;
2858947cf8SJonas Devlieghere using namespace lldb_private;
2958947cf8SJonas Devlieghere using namespace lldb_private::repro;
3058947cf8SJonas Devlieghere
SBReplayOptions()31*70599d70SJonas Devlieghere SBReplayOptions::SBReplayOptions() {}
3237469061SJonas Devlieghere
SBReplayOptions(const SBReplayOptions & rhs)33*70599d70SJonas Devlieghere SBReplayOptions::SBReplayOptions(const SBReplayOptions &rhs) {}
3437469061SJonas Devlieghere
3537469061SJonas Devlieghere SBReplayOptions::~SBReplayOptions() = default;
3637469061SJonas Devlieghere
operator =(const SBReplayOptions & rhs)3737469061SJonas Devlieghere SBReplayOptions &SBReplayOptions::operator=(const SBReplayOptions &rhs) {
381755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(this, rhs)
3937469061SJonas Devlieghere return *this;
4037469061SJonas Devlieghere }
4137469061SJonas Devlieghere
SetVerify(bool verify)421755f5b1SJonas Devlieghere void SBReplayOptions::SetVerify(bool verify) {
43*70599d70SJonas Devlieghere LLDB_INSTRUMENT_VA(this, verify);
441755f5b1SJonas Devlieghere }
4537469061SJonas Devlieghere
GetVerify() const461755f5b1SJonas Devlieghere bool SBReplayOptions::GetVerify() const {
47*70599d70SJonas Devlieghere LLDB_INSTRUMENT_VA(this);
48*70599d70SJonas Devlieghere return false;
491755f5b1SJonas Devlieghere }
5037469061SJonas Devlieghere
SetCheckVersion(bool check)5137469061SJonas Devlieghere void SBReplayOptions::SetCheckVersion(bool check) {
52*70599d70SJonas Devlieghere LLDB_INSTRUMENT_VA(this, check);
5337469061SJonas Devlieghere }
5437469061SJonas Devlieghere
GetCheckVersion() const5537469061SJonas Devlieghere bool SBReplayOptions::GetCheckVersion() const {
56*70599d70SJonas Devlieghere LLDB_INSTRUMENT_VA(this);
57*70599d70SJonas Devlieghere return false;
5837469061SJonas Devlieghere }
5937469061SJonas Devlieghere
Capture()6013ecae2fSJonas Devlieghere const char *SBReproducer::Capture() {
611755f5b1SJonas Devlieghere LLDB_INSTRUMENT()
62*70599d70SJonas Devlieghere return "Reproducer capture has been removed";
6313ecae2fSJonas Devlieghere }
6413ecae2fSJonas Devlieghere
Capture(const char * path)65936c6242SJonas Devlieghere const char *SBReproducer::Capture(const char *path) {
661755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path)
67*70599d70SJonas Devlieghere return "Reproducer capture has been removed";
68936c6242SJonas Devlieghere }
6958947cf8SJonas Devlieghere
PassiveReplay(const char * path)70fc410138SJonas Devlieghere const char *SBReproducer::PassiveReplay(const char *path) {
711755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path)
72fa126069SJonas Devlieghere return "Reproducer replay has been removed";
73fc410138SJonas Devlieghere }
74fc410138SJonas Devlieghere
Replay(const char * path)75d3ba1e02SJonas Devlieghere const char *SBReproducer::Replay(const char *path) {
761755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path)
77fa126069SJonas Devlieghere return "Reproducer replay has been removed";
78d3ba1e02SJonas Devlieghere }
79d3ba1e02SJonas Devlieghere
Replay(const char * path,bool skip_version_check)8062827737SJonas Devlieghere const char *SBReproducer::Replay(const char *path, bool skip_version_check) {
811755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path, skip_version_check)
82*70599d70SJonas Devlieghere return "Reproducer replay has been removed";
8337469061SJonas Devlieghere }
8437469061SJonas Devlieghere
Replay(const char * path,const SBReplayOptions & options)8537469061SJonas Devlieghere const char *SBReproducer::Replay(const char *path,
8637469061SJonas Devlieghere const SBReplayOptions &options) {
871755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path, options)
88*70599d70SJonas Devlieghere return "Reproducer replay has been removed";
89c8dfe907SJonas Devlieghere }
90c8dfe907SJonas Devlieghere
Finalize(const char * path)9173811d32SJonas Devlieghere const char *SBReproducer::Finalize(const char *path) {
921755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path)
938b3b66eaSJonas Devlieghere return "Reproducer finalize has been removed";
9473811d32SJonas Devlieghere }
9573811d32SJonas Devlieghere
Generate()96c8dfe907SJonas Devlieghere bool SBReproducer::Generate() {
971755f5b1SJonas Devlieghere LLDB_INSTRUMENT()
98c8dfe907SJonas Devlieghere return false;
99c8dfe907SJonas Devlieghere }
100c8dfe907SJonas Devlieghere
SetAutoGenerate(bool b)101066e817bSJonas Devlieghere bool SBReproducer::SetAutoGenerate(bool b) {
1021755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(b)
103066e817bSJonas Devlieghere return false;
104066e817bSJonas Devlieghere }
105066e817bSJonas Devlieghere
GetPath()106c8dfe907SJonas Devlieghere const char *SBReproducer::GetPath() {
1071755f5b1SJonas Devlieghere LLDB_INSTRUMENT()
108*70599d70SJonas Devlieghere return "Reproducer GetPath has been removed";
10958947cf8SJonas Devlieghere }
11058947cf8SJonas Devlieghere
SetWorkingDirectory(const char * path)1116671a81bSJonas Devlieghere void SBReproducer::SetWorkingDirectory(const char *path) {
1121755f5b1SJonas Devlieghere LLDB_INSTRUMENT_VA(path)
1136671a81bSJonas Devlieghere }
114