DebugServer2
Loading...
Searching...
No Matches
Process.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/Host/FreeBSD/PTrace.h"
14#include "DebugServer2/Target/POSIX/ELFProcess.h"
15
16namespace ds2 {
17namespace Target {
18namespace FreeBSD {
19
20class Process : public POSIX::ELFProcess {
21protected:
23
24protected:
25 ErrorCode attach(int waitStatus) override;
26
27public:
28 ErrorCode terminate() override;
29
30public:
31 ErrorCode suspend() override;
32
33public:
34 ErrorCode getMemoryRegionInfo(Address const &address,
35 MemoryRegionInfo &info) override;
36
37public:
38 ErrorCode allocateMemory(size_t size, uint32_t protection,
39 uint64_t *address) override;
40 ErrorCode deallocateMemory(uint64_t address, size_t size) override;
41
42public:
43 ErrorCode wait() override;
44
45public:
46 Host::POSIX::PTrace &ptrace() const override;
47
48protected:
49 ErrorCode updateInfo() override;
50 ErrorCode updateAuxiliaryVector() override;
51 ErrorCode enumerateAuxiliaryVector(
52 std::function<void(Support::ELFSupport::AuxiliaryVectorEntry const
53 &)> const &cb) override;
54
55protected:
56 friend class Thread;
57 ErrorCode readCPUState(ThreadId tid, Architecture::CPUState &state,
58 uint32_t flags = 0);
59 ErrorCode writeCPUState(ThreadId tid, Architecture::CPUState const &state,
60 uint32_t flags = 0);
61
62protected:
63 friend class POSIX::Process;
64};
65} // namespace FreeBSD
66} // namespace Target
67} // namespace ds2
Definition Types.h:95
Definition PTrace.h:22
Definition PTrace.h:28
Definition Process.h:20
Definition Thread.h:21
Definition ELFProcess.h:20
Definition Process.h:23
Definition Types.h:361
Definition ELFSupport.h:20