LLDB  mainline
SBFileSpec.h
Go to the documentation of this file.
1 //===-- SBFileSpec.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_SBFILESPEC_H
10 #define LLDB_API_SBFILESPEC_H
11 
12 #include "lldb/API/SBDefines.h"
13 
14 namespace lldb {
15 
17 public:
18  SBFileSpec();
19 
20  SBFileSpec(const lldb::SBFileSpec &rhs);
21 
22  SBFileSpec(const char *path); // Deprecated, use SBFileSpec (const char *path,
23  // bool resolve)
24 
25  SBFileSpec(const char *path, bool resolve);
26 
27  ~SBFileSpec();
28 
29  const SBFileSpec &operator=(const lldb::SBFileSpec &rhs);
30 
31  explicit operator bool() const;
32 
33  bool operator==(const SBFileSpec &rhs) const;
34 
35  bool operator!=(const SBFileSpec &rhs) const;
36 
37  bool IsValid() const;
38 
39  bool Exists() const;
40 
41  bool ResolveExecutableLocation();
42 
43  const char *GetFilename() const;
44 
45  const char *GetDirectory() const;
46 
47  void SetFilename(const char *filename);
48 
49  void SetDirectory(const char *directory);
50 
51  uint32_t GetPath(char *dst_path, size_t dst_len) const;
52 
53  static int ResolvePath(const char *src_path, char *dst_path, size_t dst_len);
54 
55  bool GetDescription(lldb::SBStream &description) const;
56 
57  void AppendPathComponent(const char *file_or_directory);
58 
59 private:
60  friend class SBAttachInfo;
61  friend class SBBlock;
62  friend class SBCommandInterpreter;
63  friend class SBCompileUnit;
64  friend class SBDeclaration;
65  friend class SBFileSpecList;
66  friend class SBHostOS;
67  friend class SBLaunchInfo;
68  friend class SBLineEntry;
69  friend class SBModule;
70  friend class SBModuleSpec;
71  friend class SBPlatform;
72  friend class SBProcess;
73  friend class SBProcessInfo;
74  friend class SBSourceManager;
75  friend class SBTarget;
76  friend class SBThread;
77 
78  SBFileSpec(const lldb_private::FileSpec &fspec);
79 
80  void SetFileSpec(const lldb_private::FileSpec &fspec);
81 
82  const lldb_private::FileSpec *operator->() const;
83 
84  const lldb_private::FileSpec *get() const;
85 
86  const lldb_private::FileSpec &operator*() const;
87 
88  const lldb_private::FileSpec &ref() const;
89 
90  std::unique_ptr<lldb_private::FileSpec> m_opaque_up;
91 };
92 
93 } // namespace lldb
94 
95 #endif // LLDB_API_SBFILESPEC_H
lldb::SBFileSpec::m_opaque_up
std::unique_ptr< lldb_private::FileSpec > m_opaque_up
Definition: SBFileSpec.h:90
lldb::SBLaunchInfo
Definition: SBLaunchInfo.h:23
lldb::SBModuleSpec
Definition: SBModuleSpec.h:17
lldb::SBThread
Definition: SBThread.h:20
SBDefines.h
lldb::SBCompileUnit
Definition: SBCompileUnit.h:17
lldb::SBCommandInterpreter
Definition: SBCommandInterpreter.h:19
lldb::SBDeclaration
Definition: SBDeclaration.h:18
LLDB_API
#define LLDB_API
Definition: lldb-defines.h:23
lldb::SBProcessInfo
Definition: SBProcessInfo.h:16
lldb::SBProcess
Definition: SBProcess.h:23
lldb::SBHostOS
Definition: SBHostOS.h:17
lldb::SBTarget
Definition: SBTarget.h:29
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb::SBBlock
Definition: SBBlock.h:19
lldb::operator==
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition: SBAddress.cpp:63
lldb_private::operator!=
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1005
uint32_t
lldb::SBModule
Definition: SBModule.h:20
lldb::SBFileSpec
Definition: SBFileSpec.h:16
lldb::SBLineEntry
Definition: SBLineEntry.h:18
lldb::SBStream
Definition: SBStream.h:18
lldb_private::operator*
const Scalar operator*(Scalar lhs, Scalar rhs)
Definition: Scalar.cpp:556
lldb::SBPlatform
Definition: SBPlatform.h:93
lldb::SBAttachInfo
Definition: SBAttachInfo.h:18
lldb
Definition: SBAddress.h:15
lldb::SBFileSpec
class LLDB_API SBFileSpec
Definition: SBDefines.h:46
lldb::SBFileSpecList
Definition: SBFileSpecList.h:17
lldb::SBSourceManager
Definition: SBSourceManager.h:18