2020-07-26 15:36:28 -04:00
|
|
|
//===-- SBReproducer.cpp --------------------------------------------------===//
|
2019-08-20 16:51:52 -04:00
|
|
|
//
|
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2022-01-27 17:06:42 -05:00
|
|
|
#include "lldb/API/SBReproducer.h"
|
2019-08-20 16:51:52 -04:00
|
|
|
#include "lldb/API/LLDB.h"
|
|
|
|
|
#include "lldb/API/SBAddress.h"
|
|
|
|
|
#include "lldb/API/SBAttachInfo.h"
|
|
|
|
|
#include "lldb/API/SBBlock.h"
|
|
|
|
|
#include "lldb/API/SBBreakpoint.h"
|
|
|
|
|
#include "lldb/API/SBCommandInterpreter.h"
|
2020-07-26 15:36:28 -04:00
|
|
|
#include "lldb/API/SBCommandInterpreterRunOptions.h"
|
2019-08-20 16:51:52 -04:00
|
|
|
#include "lldb/API/SBData.h"
|
|
|
|
|
#include "lldb/API/SBDebugger.h"
|
|
|
|
|
#include "lldb/API/SBDeclaration.h"
|
|
|
|
|
#include "lldb/API/SBError.h"
|
|
|
|
|
#include "lldb/API/SBFileSpec.h"
|
|
|
|
|
#include "lldb/API/SBHostOS.h"
|
|
|
|
|
#include "lldb/Host/FileSystem.h"
|
2022-01-27 17:06:42 -05:00
|
|
|
#include "lldb/Utility/Instrumentation.h"
|
2021-12-25 17:30:44 -05:00
|
|
|
#include "lldb/Version/Version.h"
|
2019-08-20 16:51:52 -04:00
|
|
|
|
|
|
|
|
using namespace lldb;
|
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
using namespace lldb_private::repro;
|
|
|
|
|
|
2023-02-11 07:38:04 -05:00
|
|
|
SBReplayOptions::SBReplayOptions() {}
|
2021-02-16 15:13:02 -05:00
|
|
|
|
2023-02-11 07:38:04 -05:00
|
|
|
SBReplayOptions::SBReplayOptions(const SBReplayOptions &rhs) {}
|
2021-02-16 15:13:02 -05:00
|
|
|
|
|
|
|
|
SBReplayOptions::~SBReplayOptions() = default;
|
|
|
|
|
|
|
|
|
|
SBReplayOptions &SBReplayOptions::operator=(const SBReplayOptions &rhs) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs)
|
2021-02-16 15:13:02 -05:00
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-27 17:06:42 -05:00
|
|
|
void SBReplayOptions::SetVerify(bool verify) {
|
2023-02-11 07:38:04 -05:00
|
|
|
LLDB_INSTRUMENT_VA(this, verify);
|
2022-01-27 17:06:42 -05:00
|
|
|
}
|
2021-02-16 15:13:02 -05:00
|
|
|
|
2022-01-27 17:06:42 -05:00
|
|
|
bool SBReplayOptions::GetVerify() const {
|
2023-02-11 07:38:04 -05:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
|
|
|
|
return false;
|
2022-01-27 17:06:42 -05:00
|
|
|
}
|
2021-02-16 15:13:02 -05:00
|
|
|
|
|
|
|
|
void SBReplayOptions::SetCheckVersion(bool check) {
|
2023-02-11 07:38:04 -05:00
|
|
|
LLDB_INSTRUMENT_VA(this, check);
|
2021-02-16 15:13:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool SBReplayOptions::GetCheckVersion() const {
|
2023-02-11 07:38:04 -05:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
|
|
|
|
return false;
|
2021-02-16 15:13:02 -05:00
|
|
|
}
|
|
|
|
|
|
2019-08-20 16:51:52 -04:00
|
|
|
const char *SBReproducer::Capture() {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT()
|
2023-02-11 07:38:04 -05:00
|
|
|
return "Reproducer capture has been removed";
|
2019-08-20 16:51:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *SBReproducer::Capture(const char *path) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path)
|
2023-02-11 07:38:04 -05:00
|
|
|
return "Reproducer capture has been removed";
|
2020-07-26 15:36:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *SBReproducer::PassiveReplay(const char *path) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path)
|
2021-12-25 17:30:44 -05:00
|
|
|
return "Reproducer replay has been removed";
|
2019-08-20 16:51:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *SBReproducer::Replay(const char *path) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path)
|
2021-12-25 17:30:44 -05:00
|
|
|
return "Reproducer replay has been removed";
|
2020-01-17 15:45:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *SBReproducer::Replay(const char *path, bool skip_version_check) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path, skip_version_check)
|
2023-02-11 07:38:04 -05:00
|
|
|
return "Reproducer replay has been removed";
|
2021-02-16 15:13:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *SBReproducer::Replay(const char *path,
|
|
|
|
|
const SBReplayOptions &options) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path, options)
|
2023-02-11 07:38:04 -05:00
|
|
|
return "Reproducer replay has been removed";
|
2019-08-20 16:51:52 -04:00
|
|
|
}
|
|
|
|
|
|
2021-02-16 15:13:02 -05:00
|
|
|
const char *SBReproducer::Finalize(const char *path) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path)
|
2022-07-03 10:10:23 -04:00
|
|
|
return "Reproducer finalize has been removed";
|
2021-02-16 15:13:02 -05:00
|
|
|
}
|
|
|
|
|
|
2020-01-17 15:45:01 -05:00
|
|
|
bool SBReproducer::Generate() {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT()
|
2020-01-17 15:45:01 -05:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
bool SBReproducer::SetAutoGenerate(bool b) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(b)
|
2020-07-26 15:36:28 -04:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-17 15:45:01 -05:00
|
|
|
const char *SBReproducer::GetPath() {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT()
|
2023-02-11 07:38:04 -05:00
|
|
|
return "Reproducer GetPath has been removed";
|
2020-01-17 15:45:01 -05:00
|
|
|
}
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
void SBReproducer::SetWorkingDirectory(const char *path) {
|
2022-01-27 17:06:42 -05:00
|
|
|
LLDB_INSTRUMENT_VA(path)
|
2020-07-26 15:36:28 -04:00
|
|
|
}
|