#include "util/linux/memory_map.h"
#include <stdio.h>
#include <string.h>
#include <sys/sysmacros.h>
#include "base/check_op.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "util/file/delimited_file_reader.h"
#include "util/file/file_io.h"
#include "util/file/string_file.h"
#include "util/stdlib/string_number_conversion.h"
namespace crashpad {
namespace {
template <typename Type>
bool HexStringToNumber(const std::string& string, Type* number) { … }
enum class ParseResult { … };
ParseResult ParseMapsLine(DelimitedFileReader* maps_file_reader,
std::vector<MemoryMap::Mapping>* mappings) { … }
class SparseReverseIterator : public MemoryMap::Iterator { … };
class FullReverseIterator : public MemoryMap::Iterator { … };
struct FastRange { … };
}
MemoryMap::Mapping::Mapping()
: … { … }
MemoryMap::MemoryMap() : … { … }
MemoryMap::~MemoryMap() { … }
bool MemoryMap::Mapping::Equals(const Mapping& other) const { … }
bool MemoryMap::Initialize(PtraceConnection* connection) { … }
const MemoryMap::Mapping* MemoryMap::FindMapping(LinuxVMAddress address) const { … }
const MemoryMap::Mapping* MemoryMap::FindMappingWithName(
const std::string& name) const { … }
std::vector<CheckedRange<VMAddress>> MemoryMap::GetReadableRanges(
const CheckedRange<VMAddress, VMSize>& range) const { … }
std::unique_ptr<MemoryMap::Iterator> MemoryMap::FindFilePossibleMmapStarts(
const Mapping& mapping) const { … }
std::unique_ptr<MemoryMap::Iterator> MemoryMap::ReverseIteratorFrom(
const Mapping& target) const { … }
}