DebugServer2
Loading...
Searching...
No Matches
Thread.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/Target/POSIX/Thread.h"
14
15#include <csignal>
16#include <libproc.h>
17
18#include <mach/mach.h>
19#include <mach/mach_vm.h>
20#include <sys/types.h>
21
22namespace ds2 {
23namespace Target {
24namespace Darwin {
25
27protected:
28 int _lastSyscallNumber;
29
30protected:
31 friend class Process;
32 Thread(Process *process, ThreadId tid);
33
34protected:
35 ErrorCode updateStopInfo(int waitStatus) override;
36 void updateState() override;
37
38public:
39 virtual ErrorCode step(int signal,
40 Address const &address = Address()) override;
41
42public:
43 virtual ErrorCode afterResume();
44
45public:
46 virtual ErrorCode readCPUState(Architecture::CPUState &state) override;
47 virtual ErrorCode writeCPUState(Architecture::CPUState const &state) override;
48
49private:
50 void updateState(bool force);
51};
52} // namespace Darwin
53} // namespace Target
54} // namespace ds2
Definition Types.h:95
Definition Process.h:20
Definition Thread.h:26
Definition Thread.h:19