Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:42

0001 //===-- SBReproducer.h ------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_API_SBREPRODUCER_H
0010 #define LLDB_API_SBREPRODUCER_H
0011 
0012 #include "lldb/API/SBDefines.h"
0013 
0014 namespace lldb_private {
0015 namespace repro {
0016 struct ReplayOptions;
0017 }
0018 } // namespace lldb_private
0019 
0020 namespace lldb {
0021 
0022 #ifndef SWIG
0023 class LLDB_API SBReplayOptions {
0024 public:
0025   SBReplayOptions();
0026   SBReplayOptions(const SBReplayOptions &rhs);
0027   ~SBReplayOptions();
0028 
0029   SBReplayOptions &operator=(const SBReplayOptions &rhs);
0030 
0031   void SetVerify(bool verify);
0032   bool GetVerify() const;
0033 
0034   void SetCheckVersion(bool check);
0035   bool GetCheckVersion() const;
0036 };
0037 #endif
0038 
0039 /// The SBReproducer class is special because it bootstraps the capture and
0040 /// replay of SB API calls. As a result we cannot rely on any other SB objects
0041 /// in the interface or implementation of this class.
0042 class LLDB_API SBReproducer {
0043 public:
0044 #ifndef SWIG
0045   static const char *Capture();
0046 #endif
0047   static const char *Capture(const char *path);
0048 #ifndef SWIG
0049   static const char *Replay(const char *path);
0050   static const char *Replay(const char *path, bool skip_version_check);
0051   static const char *Replay(const char *path, const SBReplayOptions &options);
0052 #endif
0053   static const char *PassiveReplay(const char *path);
0054 #ifndef SWIG
0055   static const char *Finalize(const char *path);
0056   static const char *GetPath();
0057 #endif
0058   static bool SetAutoGenerate(bool b);
0059 #ifndef SWIG
0060   static bool Generate();
0061 #endif
0062 
0063   /// The working directory is set to the current working directory when the
0064   /// reproducers are initialized. This method allows setting a different
0065   /// working directory. This is used by the API test suite  which temporarily
0066   /// changes the directory to where the test lives. This is a NO-OP in every
0067   /// mode but capture.
0068   static void SetWorkingDirectory(const char *path);
0069 };
0070 
0071 } // namespace lldb
0072 
0073 #endif