DebugServer2
Loading...
Searching...
No Matches
Headers
DebugServer2
Host
Darwin
PTrace.h
1
//
2
// Copyright (c) 2014-present, Facebook, Inc.
3
// All rights reserved.
4
//
5
// This source code is licensed under the University of Illinois/NCSA Open
6
// Source License found in the LICENSE file in the root directory of this
7
// source tree. An additional grant of patent rights can be found in the
8
// PATENTS file in the same directory.
9
//
10
11
#pragma once
12
13
#include "DebugServer2/Architecture/CPUState.h"
14
#include "DebugServer2/Host/POSIX/PTrace.h"
15
16
namespace
ds2 {
17
namespace
Host {
18
namespace
Darwin {
19
20
struct
PTracePrivateData;
21
22
class
PTrace
:
public
POSIX::PTrace
{
23
public
:
24
ErrorCode traceThat(ProcessId pid)
override
;
25
26
public
:
27
ErrorCode kill(
ProcessThreadId
const
&ptid,
int
signal)
override
;
28
29
public
:
30
ErrorCode readString(
ProcessThreadId
const
&ptid,
Address
const
&address,
31
std::string &str,
size_t
length,
32
size_t
*nread =
nullptr
)
override
;
33
ErrorCode readMemory(
ProcessThreadId
const
&ptid,
Address
const
&address,
34
void
*buffer,
size_t
length,
35
size_t
*nread =
nullptr
)
override
;
36
ErrorCode writeMemory(
ProcessThreadId
const
&ptid,
Address
const
&address,
37
void
const
*buffer,
size_t
length,
38
size_t
*nwritten =
nullptr
)
override
;
39
40
public
:
41
ErrorCode readCPUState(
ProcessThreadId
const
&ptid,
ProcessInfo
const
&info,
42
Architecture::CPUState &state)
override
;
43
ErrorCode writeCPUState(
ProcessThreadId
const
&ptid,
ProcessInfo
const
&info,
44
Architecture::CPUState
const
&state)
override
;
45
46
public
:
47
ErrorCode suspend(
ProcessThreadId
const
&ptid)
override
;
48
49
public
:
50
ErrorCode getSigInfo(
ProcessThreadId
const
&ptid, siginfo_t &si)
override
;
51
};
52
}
// namespace Darwin
53
}
// namespace Host
54
}
// namespace ds2
ds2::Address
Definition
Types.h:95
ds2::Host::Darwin::PTrace
Definition
PTrace.h:22
ds2::Host::POSIX::PTrace
Definition
PTrace.h:28
ds2::ProcessInfo
Definition
Types.h:263
ds2::ProcessThreadId
Definition
Types.h:57
Generated by
1.12.0