Crashpad
|
Provides an interface for making ptrace
requests against a process and its threads.
More...
#include "util/linux/ptrace_connection.h"
Public Member Functions | |
virtual pid_t | GetProcessID ()=0 |
Returns the process ID of the connected process. | |
virtual bool | Attach (pid_t tid)=0 |
Adds a new thread to this connection. More... | |
virtual bool | Is64Bit ()=0 |
Returns true if connected to a 64-bit process. | |
virtual bool | GetThreadInfo (pid_t tid, ThreadInfo *info)=0 |
Retrieves a ThreadInfo for a target thread. More... | |
virtual bool | ReadFileContents (const base::FilePath &path, std::string *contents)=0 |
Reads the entire contents of a file. More... | |
virtual ProcessMemory * | Memory ()=0 |
Returns a memory reader for the connected process. More... | |
virtual bool | Threads (std::vector< pid_t > *threads)=0 |
Determines the thread IDs of the threads in the connected process. More... | |
Provides an interface for making ptrace
requests against a process and its threads.
|
pure virtual |
Adds a new thread to this connection.
[in] | tid | The thread ID of the thread to attach. |
true
on success. false
on failure with a message logged. Implemented in crashpad::PtraceClient, crashpad::DirectPtraceConnection, and crashpad::test::FakePtraceConnection.
|
pure virtual |
Retrieves a ThreadInfo for a target thread.
[in] | tid | The thread ID of the target thread. |
[out] | info | Information about the thread. |
true
on success. false
on failure with a message logged. Implemented in crashpad::PtraceClient, crashpad::test::FakePtraceConnection, and crashpad::DirectPtraceConnection.
|
pure virtual |
Returns a memory reader for the connected process.
The caller does not take ownership of the reader. The reader is valid for the lifetime of the PtraceConnection that created it.
Implemented in crashpad::test::FakePtraceConnection, crashpad::PtraceClient, and crashpad::DirectPtraceConnection.
|
pure virtual |
Reads the entire contents of a file.
[in] | path | The path of the file to read. |
[out] | contents | The file contents, valid if this method returns true . |
true
on success. false
on failure with a message logged. Implemented in crashpad::PtraceClient, crashpad::test::FakePtraceConnection, and crashpad::DirectPtraceConnection.
|
pure virtual |
Determines the thread IDs of the threads in the connected process.
[out] | threads | The list of thread IDs. |
true
on success, false
on failure with a message logged. If this method returns false
, threads may contain a partial list of thread IDs. Implemented in crashpad::test::FakePtraceConnection, crashpad::PtraceClient, and crashpad::DirectPtraceConnection.