VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /proc/thread-self/root/usr/lib/llvm-10/include/llvm/DebugInfo/DWARF/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/lib/llvm-10/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
//===- DWARFDebugRangeList.h ------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGRANGELIST_H
#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGRANGELIST_H

#include "llvm/DebugInfo/DWARF/DWARFAddressRange.h"
#include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
#include <cassert>
#include <cstdint>
#include <vector>

namespace llvm {

class raw_ostream;

class DWARFDebugRangeList {
public:
  struct RangeListEntry {
    /// A beginning address offset. This address offset has the size of an
    /// address and is relative to the applicable base address of the
    /// compilation unit referencing this range list. It marks the beginning
    /// of an address range.
    uint64_t StartAddress;
    /// An ending address offset. This address offset again has the size of
    /// an address and is relative to the applicable base address of the
    /// compilation unit referencing this range list. It marks the first
    /// address past the end of the address range. The ending address must
    /// be greater than or equal to the beginning address.
    uint64_t EndAddress;
    /// A section index this range belongs to.
    uint64_t SectionIndex;

    /// The end of any given range list is marked by an end of list entry,
    /// which consists of a 0 for the beginning address offset
    /// and a 0 for the ending address offset.
    bool isEndOfListEntry() const {
      return (StartAddress == 0) && (EndAddress == 0);
    }

    /// A base address selection entry consists of:
    /// 1. The value of the largest representable address offset
    /// (for example, 0xffffffff when the size of an address is 32 bits).
    /// 2. An address, which defines the appropriate base address for
    /// use in interpreting the beginning and ending address offsets of
    /// subsequent entries of the location list.
    bool isBaseAddressSelectionEntry(uint8_t AddressSize) const {
      assert(AddressSize == 4 || AddressSize == 8);
      if (AddressSize == 4)
        return StartAddress == -1U;
      return StartAddress == -1ULL;
    }
  };

private:
  /// Offset in .debug_ranges section.
  uint64_t Offset;
  uint8_t AddressSize;
  std::vector<RangeListEntry> Entries;

public:
  DWARFDebugRangeList() { clear(); }

  void clear();
  void dump(raw_ostream &OS) const;
  Error extract(const DWARFDataExtractor &data, uint64_t *offset_ptr);
  const std::vector<RangeListEntry> &getEntries() { return Entries; }

  /// getAbsoluteRanges - Returns absolute address ranges defined by this range
  /// list. Has to be passed base address of the compile unit referencing this
  /// range list.
  DWARFAddressRangesVector
  getAbsoluteRanges(llvm::Optional<object::SectionedAddress> BaseAddr) const;
};

} // end namespace llvm

#endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGRANGELIST_H

VaKeR 2022