chromium/third_party/crashpad/crashpad/util/linux/memory_map.cc

// Copyright 2017 The Crashpad Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#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) {}

// The result from parsing a line from the maps file.
enum class ParseResult {};

// Reads a line from a maps file being read by maps_file_reader and extends
// mappings with a new MemoryMap::Mapping describing the line.
ParseResult ParseMapsLine(DelimitedFileReader* maps_file_reader,
                          std::vector<MemoryMap::Mapping>* mappings) {}

class SparseReverseIterator : public MemoryMap::Iterator {};

class FullReverseIterator : public MemoryMap::Iterator {};

// Faster than a CheckedRange, for temporary values.
struct FastRange {};

}  // namespace

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 {}

}  // namespace crashpad