LLDB  mainline
ScriptedThread.h
Go to the documentation of this file.
1 //===-- ScriptedThread.h ----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_SCRIPTED_THREAD_H
10 #define LLDB_SOURCE_PLUGINS_SCRIPTED_THREAD_H
11 
12 #include <string>
13 
14 #include "ScriptedProcess.h"
15 
19 #include "lldb/Target/Thread.h"
20 
21 namespace lldb_private {
22 class ScriptedProcess;
23 }
24 
25 namespace lldb_private {
26 
28 public:
30 
31  ~ScriptedThread() override;
32 
33  lldb::RegisterContextSP GetRegisterContext() override;
34 
35  lldb::RegisterContextSP
37 
38  bool CalculateStopInfo() override;
39 
40  const char *GetInfo() override { return nullptr; }
41 
42  const char *GetName() override;
43 
44  const char *GetQueueName() override;
45 
46  void WillResume(lldb::StateType resume_state) override;
47 
48  void RefreshStateAfterStop() override;
49 
50  void ClearStackFrames() override;
51 
52 private:
54  lldb::ScriptedThreadInterfaceSP GetInterface() const;
55 
56  ScriptedThread(const ScriptedThread &) = delete;
57  const ScriptedThread &operator=(const ScriptedThread &) = delete;
58 
59  std::shared_ptr<DynamicRegisterInfo> GetDynamicRegisterInfo();
60 
62  std::shared_ptr<DynamicRegisterInfo> m_register_info_sp = nullptr;
64 };
65 
66 } // namespace lldb_private
67 
68 #endif // LLDB_SOURCE_PLUGINS_SCRIPTED_THREAD_H
lldb_private::ScriptedThread::CheckInterpreterAndScriptObject
void CheckInterpreterAndScriptObject() const
Definition: ScriptedThread.cpp:26
lldb_private::ScriptedThread::CalculateStopInfo
bool CalculateStopInfo() override
Definition: ScriptedThread.cpp:136
lldb_private::ScriptedThread::m_register_info_sp
std::shared_ptr< DynamicRegisterInfo > m_register_info_sp
Definition: ScriptedThread.h:62
RegisterContextMemory.h
DynamicRegisterInfo.h
lldb_private::ScriptedThread::ScriptedThread
ScriptedThread(ScriptedProcess &process, Status &error)
Definition: ScriptedThread.cpp:31
lldb_private::ScriptedThread::GetName
const char * GetName() override
Definition: ScriptedThread.cpp:71
lldb_private::ScriptedThread::~ScriptedThread
~ScriptedThread() override
Definition: ScriptedThread.cpp:69
lldb_private::ScriptedThread::ClearStackFrames
void ClearStackFrames() override
Definition: ScriptedThread.cpp:89
lldb_private::ScriptedThread::RefreshStateAfterStop
void RefreshStateAfterStop() override
Definition: ScriptedThread.cpp:188
lldb_private::ScriptedThread::GetInfo
const char * GetInfo() override
Definition: ScriptedThread.h:40
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ScriptedThread::CreateRegisterContextForFrame
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
Definition: ScriptedThread.cpp:98
ScriptedProcess.h
lldb_private::Thread
Definition: Thread.h:60
lldb_private::ScriptedThread::GetRegisterContext
lldb::RegisterContextSP GetRegisterContext() override
Definition: ScriptedThread.cpp:91
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::ScriptedThread::m_script_object_sp
lldb_private::StructuredData::ObjectSP m_script_object_sp
Definition: ScriptedThread.h:63
Thread.h
lldb_private::Status
Definition: Status.h:44
lldb_private::ScriptedThread::GetInterface
lldb::ScriptedThreadInterfaceSP GetInterface() const
Definition: ScriptedThread.cpp:192
lldb_private::ScriptedThread::m_scripted_process
const ScriptedProcess & m_scripted_process
Definition: ScriptedThread.h:61
lldb_private::ScriptedThread::operator=
const ScriptedThread & operator=(const ScriptedThread &)=delete
lldb_private::ScriptedProcess
Definition: ScriptedProcess.h:22
lldb_private::ScriptedThread::WillResume
void WillResume(lldb::StateType resume_state) override
Definition: ScriptedThread.cpp:87
lldb_private::ScriptedThread::GetDynamicRegisterInfo
std::shared_ptr< DynamicRegisterInfo > GetDynamicRegisterInfo()
Definition: ScriptedThread.cpp:196
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ScriptedThread
Definition: ScriptedThread.h:27
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::ScriptedThread::GetQueueName
const char * GetQueueName() override
Retrieve the Queue name for the queue currently using this Thread.
Definition: ScriptedThread.cpp:79
lldb_private::StackFrame
Definition: StackFrame.h:40
ScriptInterpreter.h