#include "util/numeric/checked_address_range.h"
#include "base/check_op.h"
#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_APPLE)
#include <mach/mach.h>
#elif BUILDFLAG(IS_WIN)
#include "util/win/address_types.h"
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
#include "util/linux/address_types.h"
#elif BUILDFLAG(IS_FUCHSIA)
#include <zircon/types.h>
#endif
namespace crashpad {
namespace internal {
template <class ValueType, class SizeType>
CheckedAddressRangeGeneric<ValueType, SizeType>::CheckedAddressRangeGeneric()
: … { … }
template <class ValueType, class SizeType>
CheckedAddressRangeGeneric<ValueType, SizeType>::CheckedAddressRangeGeneric(
bool is_64_bit,
ValueType base,
SizeType size)
#if defined(COMPILER_MSVC)
: … { … }
template <class ValueType, class SizeType>
ValueType CheckedAddressRangeGeneric<ValueType, SizeType>::Base() const { … }
template <class ValueType, class SizeType>
SizeType CheckedAddressRangeGeneric<ValueType, SizeType>::Size() const { … }
template <class ValueType, class SizeType>
ValueType CheckedAddressRangeGeneric<ValueType, SizeType>::End() const { … }
template <class ValueType, class SizeType>
bool CheckedAddressRangeGeneric<ValueType, SizeType>::IsValid() const { … }
template <class ValueType, class SizeType>
void CheckedAddressRangeGeneric<ValueType, SizeType>::SetRange(bool is_64_bit,
ValueType base,
SizeType size) { … }
template <class ValueType, class SizeType>
bool CheckedAddressRangeGeneric<ValueType, SizeType>::ContainsValue(
ValueType value) const { … }
template <class ValueType, class SizeType>
bool CheckedAddressRangeGeneric<ValueType, SizeType>::ContainsRange(
const CheckedAddressRangeGeneric& that) const { … }
template <class ValueType, class SizeType>
std::string CheckedAddressRangeGeneric<ValueType, SizeType>::AsString() const { … }
#if BUILDFLAG(IS_APPLE)
template class CheckedAddressRangeGeneric<mach_vm_address_t, mach_vm_size_t>;
#elif BUILDFLAG(IS_WIN)
template class CheckedAddressRangeGeneric<WinVMAddress, WinVMSize>;
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
template class CheckedAddressRangeGeneric<LinuxVMAddress, LinuxVMSize>;
#elif BUILDFLAG(IS_FUCHSIA)
template class CheckedAddressRangeGeneric<zx_vaddr_t, size_t>;
#endif
}
}