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/ThreadBase.h"
14
15namespace ds2 {
16namespace Target {
17namespace Windows {
18
20protected:
21 HANDLE _handle;
22
23protected:
24 friend class Process;
25 Thread(Process *process, ThreadId tid, HANDLE handle);
26
27public:
28 virtual ~Thread();
29
30public:
31 virtual ErrorCode terminate() override;
32
33public:
34 virtual ErrorCode suspend() override;
35
36public:
37 virtual ErrorCode step(int signal = 0,
38 Address const &address = Address()) override;
39 virtual ErrorCode resume(int signal = 0,
40 Address const &address = Address()) override;
41
42public:
43 virtual ErrorCode readCPUState(Architecture::CPUState &state) override;
44 virtual ErrorCode writeCPUState(Architecture::CPUState const &state) override;
45
46protected:
47 virtual void updateState() override;
48 virtual void updateState(DEBUG_EVENT const &de);
49};
50} // namespace Windows
51} // namespace Target
52} // namespace ds2
Definition Types.h:95
Definition ThreadBase.h:22
Definition Process.h:21
Definition Thread.h:19