DebugServer2
Loading...
Searching...
No Matches
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
16namespace ds2 {
17namespace Host {
18namespace FreeBSD {
19
20struct PTracePrivateData;
21
22class PTrace : public POSIX::PTrace {
23public:
24 virtual ErrorCode traceThat(ProcessId pid);
25
26public:
27 virtual ErrorCode kill(ProcessThreadId const &ptid, int signal);
28
29public:
30 virtual ErrorCode readString(ProcessThreadId const &ptid,
31 Address const &address, std::string &str,
32 size_t length, size_t *nread = nullptr);
33 virtual ErrorCode readMemory(ProcessThreadId const &ptid,
34 Address const &address, void *buffer,
35 size_t length, size_t *nread = nullptr);
36 virtual ErrorCode writeMemory(ProcessThreadId const &ptid,
37 Address const &address, void const *buffer,
38 size_t length, size_t *nwritten = nullptr);
39
40public:
41 virtual ErrorCode readCPUState(ProcessThreadId const &ptid,
42 ProcessInfo const &info,
43 Architecture::CPUState &state);
44 virtual ErrorCode writeCPUState(ProcessThreadId const &ptid,
45 ProcessInfo const &info,
46 Architecture::CPUState const &state);
47
48public:
49 virtual ErrorCode getLwpInfo(ProcessThreadId const &ptid,
50 struct ptrace_lwpinfo *lwpinfo);
51
52public:
53 virtual ErrorCode getSigInfo(ProcessThreadId const &ptid, siginfo_t &si);
54};
55} // namespace FreeBSD
56} // namespace Host
57} // namespace ds2
Definition Types.h:95
Definition PTrace.h:22
Definition PTrace.h:28
Definition Types.h:263
Definition Types.h:57