Crashpad
Classes | Public Member Functions | List of all members
crashpad::MemoryMap Class Reference

Accesses information about mapped memory in another process. More...

#include "util/linux/memory_map.h"

Classes

struct  Mapping
 Information about a mapped region of memory. More...
 

Public Member Functions

bool Initialize (pid_t pid)
 Initializes this object with information about the mapped memory regions in the process whose ID is pid. More...
 
const MappingFindMapping (LinuxVMAddress address) const
 
const MappingFindMappingWithName (const std::string &name) const
 

Detailed Description

Accesses information about mapped memory in another process.

The target process must be stopped to guarantee correct mappings. If the target process is not stopped, mappings may be invalid after the return from Initialize(), and even mappings existing at the time Initialize() was called may not be found.

Member Function Documentation

◆ FindMapping()

const MemoryMap::Mapping * crashpad::MemoryMap::FindMapping ( LinuxVMAddress  address) const
Returns
The Mapping containing address or nullptr if no match is found. The caller does not take ownership of this object. It is scoped to the lifetime of the MemoryMap object that it was obtained from.

◆ FindMappingWithName()

const MemoryMap::Mapping * crashpad::MemoryMap::FindMappingWithName ( const std::string &  name) const
Returns
The Mapping with the lowest base address whose name is name or nullptr if no match is found. The caller does not take ownership of this object. It is scoped to the lifetime of the MemoryMap object that it was obtained from.

◆ Initialize()

bool crashpad::MemoryMap::Initialize ( pid_t  pid)

Initializes this object with information about the mapped memory regions in the process whose ID is pid.

This method must be called successfully prior to calling any other method in this class. This method may only be called once.

Parameters
[in]pidThe process ID to obtain information for.
Returns
true on success, false on failure with a message logged.

The documentation for this class was generated from the following files: