LLDB mainline
ThreadPlanTracer.h
Go to the documentation of this file.
1//===-- ThreadPlanTracer.h --------------------------------------------*- C++
2//-*-===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLDB_TARGET_THREADPLANTRACER_H
11#define LLDB_TARGET_THREADPLANTRACER_H
12
14#include "lldb/Target/Thread.h"
16#include "lldb/lldb-private.h"
17
18namespace lldb_private {
19
21 friend class ThreadPlan;
22
23public:
29 };
30
31 ThreadPlanTracer(Thread &thread, lldb::StreamSP &stream_sp);
32 ThreadPlanTracer(Thread &thread);
33
34 virtual ~ThreadPlanTracer() = default;
35
36 virtual void TracingStarted() {}
37
38 virtual void TracingEnded() {}
39
40 bool EnableTracing(bool value) {
41 bool old_value = m_enabled;
42 m_enabled = value;
43 if (old_value == false && value == true)
45 else if (old_value == true && value == false)
47
48 return old_value;
49 }
50
51 bool TracingEnabled() { return m_enabled; }
52
54
55protected:
58
60
61 virtual void Log();
62
63private:
64 bool TracerExplainsStop();
65
69};
70
72public:
76
77 void TracingStarted() override;
78 void TracingEnded() override;
79 void Log() override;
80
81private:
83
85
88 std::vector<RegisterValue> m_register_values;
90};
91
92} // namespace lldb_private
93
94#endif // LLDB_TARGET_THREADPLANTRACER_H
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
std::vector< RegisterValue > m_register_values
virtual ~ThreadPlanTracer()=default
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Stream > StreamSP
Definition: lldb-forward.h:428
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
Definition: lldb-forward.h:339
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:334
uint64_t tid_t
Definition: lldb-types.h:84