Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- SBAddressRange.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_SBADDRESSRANGE_H
0010 #define LLDB_API_SBADDRESSRANGE_H
0011 
0012 #include "lldb/API/SBDefines.h"
0013 
0014 namespace lldb_private {
0015 class AddressRange;
0016 }
0017 
0018 namespace lldb {
0019 
0020 class LLDB_API SBAddressRange {
0021 public:
0022   SBAddressRange();
0023 
0024   SBAddressRange(const lldb::SBAddressRange &rhs);
0025 
0026   SBAddressRange(lldb::SBAddress addr, lldb::addr_t byte_size);
0027 
0028   ~SBAddressRange();
0029 
0030   const lldb::SBAddressRange &operator=(const lldb::SBAddressRange &rhs);
0031 
0032   void Clear();
0033 
0034   /// Check the address range refers to a valid base address and has a byte
0035   /// size greater than zero.
0036   ///
0037   /// \return
0038   ///     True if the address range is valid, false otherwise.
0039   bool IsValid() const;
0040 
0041   /// Get the base address of the range.
0042   ///
0043   /// \return
0044   ///     Base address object.
0045   lldb::SBAddress GetBaseAddress() const;
0046 
0047   /// Get the byte size of this range.
0048   ///
0049   /// \return
0050   ///     The size in bytes of this address range.
0051   lldb::addr_t GetByteSize() const;
0052 
0053   bool operator==(const SBAddressRange &rhs);
0054 
0055   bool operator!=(const SBAddressRange &rhs);
0056 
0057   bool GetDescription(lldb::SBStream &description, const SBTarget target);
0058 
0059 private:
0060   friend class SBAddressRangeList;
0061   friend class SBBlock;
0062   friend class SBFunction;
0063   friend class SBProcess;
0064 
0065   lldb_private::AddressRange &ref() const;
0066 
0067   AddressRangeUP m_opaque_up;
0068 };
0069 
0070 } // namespace lldb
0071 
0072 #endif // LLDB_API_SBADDRESSRANGE_H