24 enum State { kInvalid, kRunning, kStepped, kStopped, kTerminated };
39 inline Process *process()
const {
return _process; }
40 inline ThreadId tid()
const {
return _tid; }
41 inline StopInfo const &stopInfo()
const {
return _stopInfo; }
44 virtual ErrorCode terminate() = 0;
47 virtual ErrorCode suspend() = 0;
50 inline State state()
const {
return _state; }
53 virtual ErrorCode step(
int signal = 0,
55 virtual ErrorCode resume(
int signal = 0,
59 virtual ErrorCode beforeResume();
62 virtual ErrorCode readCPUState(Architecture::CPUState &state) = 0;
63 virtual ErrorCode writeCPUState(Architecture::CPUState
const &state) = 0;
64 virtual ErrorCode modifyRegisters(
65 std::function<
void(Architecture::CPUState &state)> action)
final;
68 inline uint32_t core()
const {
return _stopInfo.core; }
72 virtual void updateState() = 0;