crashpad::ProcessReaderLinux Class Reference

Accesses information about another process, identified by a process ID. More...

`#include "snapshot/linux/process_reader_linux.h"`

## Classes

struct | Module
| Contains information about a module loaded into a process. More...
struct | Thread
| Contains information about a thread that belongs to a process. More...

## Public Member Functions

bool | Initialize (PtraceConnection *connection)
| Initializes this object. More...
bool | Is64Bit () const
| Return `true` if the target task is a 64-bit process.
pid_t | ProcessID () const
| Return the target process' process ID.
pid_t | ParentProcessID () const
| Return the target process' parent process ID.
ProcessMemory * | Memory ()
| Return a memory reader for the target process.
MemoryMap * | GetMemoryMap ()
| Return a memory map of the target process.
bool | StartTime (timeval *start_time) const
| Determines the target process’ start time. More...
bool | CPUTimes (timeval *user_time, timeval *system_time) const
| Determines the target process’ execution time. More...
const std::vector< Thread > & | Threads ()
| Return a vector of threads that are in the task process. If the main thread is able to be identified and traced, it will be placed at index `0`.
const std::vector< Module > & | Modules ()

## Detailed Description

Accesses information about another process, identified by a process ID.

## Member Function Documentation

## CPUTimes()

bool crashpad::ProcessReaderLinux::CPUTimes | ( | timeval * | user_time,
|  | timeval * | system_time
| ) |  | const

Determines the target process’ execution time.

Parameters

  [out] | user_time | The amount of time the process has executed code in user mode.
  [out] | system_time | The amount of time the process has executed code in system mode.

Returns
  `true` on success, `false` on failure, with a warning logged. On failure, user_time and system_time will be set to represent no time spent executing code in user or system mode.

## Initialize()

bool crashpad::ProcessReaderLinux::Initialize | ( | PtraceConnection * | connection | ) |

Initializes this object.

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

Parameters

  [in] | connection | A PtraceConnection to the target process.

Returns
  `true` on success. `false` on failure with a message logged.

## Modules()

const std::vector< ProcessReaderLinux::Module > & crashpad::ProcessReaderLinux::Modules | ( |  | ) |

Returns
  The modules loaded in the process. The first element (at index `0`) corresponds to the main executable.

## StartTime()

bool crashpad::ProcessReaderLinux::StartTime | ( | timeval * | start_time | ) | const

Determines the target process’ start time.

Parameters

  [out] | start_time | The time that the process started.

Returns
  `true` on success with start_time set. Otherwise `false` with a message logged.

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

- snapshot/linux/process_reader_linux.h
- snapshot/linux/process_reader_linux.cc