LLDB  mainline
SBReproducer.h
Go to the documentation of this file.
1 //===-- SBReproducer.h ------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_API_SBREPRODUCER_H
10 #define LLDB_API_SBREPRODUCER_H
11 
12 #include "lldb/API/SBDefines.h"
13 
14 namespace lldb_private {
15 namespace repro {
16 struct ReplayOptions;
17 }
18 } // namespace lldb_private
19 
20 namespace lldb {
21 
23 public:
25  SBReplayOptions(const SBReplayOptions &rhs);
26  ~SBReplayOptions();
27 
28  SBReplayOptions &operator=(const SBReplayOptions &rhs);
29 
30  void SetVerify(bool verify);
31  bool GetVerify() const;
32 
33  void SetCheckVersion(bool check);
34  bool GetCheckVersion() const;
35 
36 private:
37  std::unique_ptr<lldb_private::repro::ReplayOptions> m_opaque_up;
38 };
39 
40 /// The SBReproducer class is special because it bootstraps the capture and
41 /// replay of SB API calls. As a result we cannot rely on any other SB objects
42 /// in the interface or implementation of this class.
44 public:
45  static const char *Capture();
46  static const char *Capture(const char *path);
47  static const char *Replay(const char *path);
48  static const char *Replay(const char *path, bool skip_version_check);
49  static const char *Replay(const char *path, const SBReplayOptions &options);
50  static const char *PassiveReplay(const char *path);
51  static const char *Finalize(const char *path);
52  static const char *GetPath();
53  static bool SetAutoGenerate(bool b);
54  static bool Generate();
55 
56  /// The working directory is set to the current working directory when the
57  /// reproducers are initialized. This method allows setting a different
58  /// working directory. This is used by the API test suite which temporarily
59  /// changes the directory to where the test lives. This is a NO-OP in every
60  /// mode but capture.
61  static void SetWorkingDirectory(const char *path);
62 };
63 
64 } // namespace lldb
65 
66 #endif
lldb::SBReplayOptions
Definition: SBReproducer.h:22
SBDefines.h
LLDB_API
#define LLDB_API
Definition: lldb-defines.h:23
lldb_private::repro::Finalize
llvm::Error Finalize(Loader *loader)
Definition: Reproducer.cpp:365
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::repro::ReplayOptions
Definition: Reproducer.h:241
lldb
Definition: SBAddress.h:15
lldb::SBReproducer
The SBReproducer class is special because it bootstraps the capture and replay of SB API calls.
Definition: SBReproducer.h:43
lldb::SBReplayOptions::m_opaque_up
std::unique_ptr< lldb_private::repro::ReplayOptions > m_opaque_up
Definition: SBReproducer.h:37