Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- SBFileSpec.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_SBFILESPEC_H
0010 #define LLDB_API_SBFILESPEC_H
0011 
0012 #include "lldb/API/SBDefines.h"
0013 
0014 namespace lldb {
0015 
0016 class LLDB_API SBFileSpec {
0017 public:
0018   SBFileSpec();
0019 
0020   SBFileSpec(const lldb::SBFileSpec &rhs);
0021 
0022   LLDB_DEPRECATED_FIXME(
0023       "Use the other constructor to determine if this the file "
0024       "spec should be resolved",
0025       "SBFileSpec(const char *, bool)")
0026   SBFileSpec(const char *path);
0027 
0028   SBFileSpec(const char *path, bool resolve);
0029 
0030   ~SBFileSpec();
0031 
0032   const SBFileSpec &operator=(const lldb::SBFileSpec &rhs);
0033 
0034   explicit operator bool() const;
0035 
0036   bool operator==(const SBFileSpec &rhs) const;
0037 
0038   bool operator!=(const SBFileSpec &rhs) const;
0039 
0040   bool IsValid() const;
0041 
0042   bool Exists() const;
0043 
0044   bool ResolveExecutableLocation();
0045 
0046   const char *GetFilename() const;
0047 
0048   const char *GetDirectory() const;
0049 
0050   void SetFilename(const char *filename);
0051 
0052   void SetDirectory(const char *directory);
0053 
0054   uint32_t GetPath(char *dst_path, size_t dst_len) const;
0055 
0056   static int ResolvePath(const char *src_path, char *dst_path, size_t dst_len);
0057 
0058   bool GetDescription(lldb::SBStream &description) const;
0059 
0060   void AppendPathComponent(const char *file_or_directory);
0061 
0062 private:
0063   friend class SBAttachInfo;
0064   friend class SBBlock;
0065   friend class SBCommandInterpreter;
0066   friend class SBCompileUnit;
0067   friend class SBDeclaration;
0068   friend class SBFileSpecList;
0069   friend class SBHostOS;
0070   friend class SBLaunchInfo;
0071   friend class SBLineEntry;
0072   friend class SBModule;
0073   friend class SBModuleSpec;
0074   friend class SBPlatform;
0075   friend class SBProcess;
0076   friend class SBProcessInfo;
0077   friend class SBSourceManager;
0078   friend class SBTarget;
0079   friend class SBThread;
0080   friend class SBTrace;
0081   friend class SBSaveCoreOptions;
0082 
0083   SBFileSpec(const lldb_private::FileSpec &fspec);
0084 
0085   void SetFileSpec(const lldb_private::FileSpec &fspec);
0086 
0087   const lldb_private::FileSpec *operator->() const;
0088 
0089   const lldb_private::FileSpec *get() const;
0090 
0091   const lldb_private::FileSpec &operator*() const;
0092 
0093   const lldb_private::FileSpec &ref() const;
0094 
0095   std::unique_ptr<lldb_private::FileSpec> m_opaque_up;
0096 };
0097 
0098 } // namespace lldb
0099 
0100 #endif // LLDB_API_SBFILESPEC_H