1 //===-- SBSaveCoreOptions.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_SBSAVECOREOPTIONS_H 10 #define LLDB_API_SBSAVECOREOPTIONS_H 11 12 #include "lldb/API/SBDefines.h" 13 14 namespace lldb { 15 16 class LLDB_API SBSaveCoreOptions { 17 public: 18 SBSaveCoreOptions(); 19 SBSaveCoreOptions(const lldb::SBSaveCoreOptions &rhs); 20 ~SBSaveCoreOptions(); 21 22 const SBSaveCoreOptions &operator=(const lldb::SBSaveCoreOptions &rhs); 23 24 /// Set the plugin name. Supplying null or empty string will reset 25 /// the option. 26 /// 27 /// \param plugin Name of the object file plugin. 28 SBError SetPluginName(const char *plugin); 29 30 /// Get the Core dump plugin name, if set. 31 /// 32 /// \return The name of the plugin, or null if not set. 33 const char *GetPluginName() const; 34 35 /// Set the Core dump style. 36 /// 37 /// \param style The style of the core dump. 38 void SetStyle(lldb::SaveCoreStyle style); 39 40 /// Get the Core dump style, if set. 41 /// 42 /// \return The core dump style, or undefined if not set. 43 lldb::SaveCoreStyle GetStyle() const; 44 45 /// Set the output file path 46 /// 47 /// \param output_file a 48 /// \class SBFileSpec object that describes the output file. 49 void SetOutputFile(SBFileSpec output_file); 50 51 /// Get the output file spec 52 /// 53 /// \return The output file spec. 54 SBFileSpec GetOutputFile() const; 55 56 /// Reset all options. 57 void Clear(); 58 59 protected: 60 friend class SBProcess; 61 lldb_private::SaveCoreOptions &ref() const; 62 63 private: 64 std::unique_ptr<lldb_private::SaveCoreOptions> m_opaque_up; 65 }; // SBSaveCoreOptions 66 } // namespace lldb 67 68 #endif // LLDB_API_SBSAVECOREOPTIONS_H 69