Crashpad
|
Provides an architecturally agnostic interface for collecting information with ptrace
.
More...
#include "util/linux/ptracer.h"
Public Member Functions | |
Ptracer (bool is_64_bit) | |
Constructs this object with a pre-determined bitness. More... | |
Ptracer () | |
Constructs this object without a pre-determined bitness. More... | |
bool | Initialize (pid_t pid) |
Initializes this object to the bitness of the process whose process ID is pid. More... | |
bool | Is64Bit () |
Return true if this object is configured for 64-bit. | |
bool | GetThreadInfo (pid_t tid, ThreadInfo *info) |
Uses ptrace to collect information about the thread with thread ID tid. More... | |
Provides an architecturally agnostic interface for collecting information with ptrace
.
A ptracer is configured for a particular bitness. It is an error to make any calls via this object against a thread whose bitness does not match the bitness this object was initialized with.
|
explicit |
Constructs this object with a pre-determined bitness.
[in] | is_64_bit | true if this object is to be configured for 64-bit. |
crashpad::Ptracer::Ptracer | ( | ) |
Constructs this object without a pre-determined bitness.
Initialize() must be successfully called before making any other calls on this object.
bool crashpad::Ptracer::GetThreadInfo | ( | pid_t | tid, |
ThreadInfo * | info | ||
) |
Uses ptrace
to collect information about the thread with thread ID tid.
The target thread should be attached before calling this method.
[in] | tid | The thread ID of the thread to collect information for. |
[out] | info | A ThreadInfo for the thread. |
true
on success. false
on failure with a message logged. bool crashpad::Ptracer::Initialize | ( | pid_t | pid | ) |
Initializes this object to the bitness of the process whose process ID is pid.
[in] | pid | The process ID of the process to initialize with. |
true
on success. false
on failure with a message logged.