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
21namespace lldb_private {
22class ScriptedProcess;
23}
24
25namespace lldb_private {
26
28
29public:
32 StructuredData::GenericSP script_object_sp = nullptr);
33
34 ~ScriptedThread() override;
35
36 static llvm::Expected<std::shared_ptr<ScriptedThread>>
37 Create(ScriptedProcess &process,
38 StructuredData::Generic *script_object = nullptr);
39
41
44
46
47 bool CalculateStopInfo() override;
48
49 const char *GetInfo() override { return nullptr; }
50
51 const char *GetName() override;
52
53 const char *GetQueueName() override;
54
55 void WillResume(lldb::StateType resume_state) override;
56
57 void RefreshStateAfterStop() override;
58
59 void ClearStackFrames() override;
60
62
63private:
66
67 ScriptedThread(const ScriptedThread &) = delete;
68 const ScriptedThread &operator=(const ScriptedThread &) = delete;
69
70 std::shared_ptr<DynamicRegisterInfo> GetDynamicRegisterInfo();
71
75 std::shared_ptr<DynamicRegisterInfo> m_register_info_sp = nullptr;
76};
77
78} // namespace lldb_private
79
80#endif // LLDB_SOURCE_PLUGINS_SCRIPTED_THREAD_H
void CheckInterpreterAndScriptObject() const
std::shared_ptr< DynamicRegisterInfo > GetDynamicRegisterInfo()
const ScriptedThread & operator=(const ScriptedThread &)=delete
lldb_private::StructuredData::GenericSP m_script_object_sp
const char * GetQueueName() override
Retrieve the Queue name for the queue currently using this Thread.
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
std::shared_ptr< DynamicRegisterInfo > m_register_info_sp
lldb::ScriptedThreadInterfaceSP GetInterface() const
const char * GetInfo() override
StructuredData::ObjectSP FetchThreadExtendedInfo() override
lldb::ScriptedThreadInterfaceSP m_scripted_thread_interface_sp
ScriptedThread(const ScriptedThread &)=delete
static llvm::Expected< std::shared_ptr< ScriptedThread > > Create(ScriptedProcess &process, StructuredData::Generic *script_object=nullptr)
void RefreshStateAfterStop() override
void WillResume(lldb::StateType resume_state) override
const char * GetName() override
bool CalculateStopInfo() override
Ask the thread subclass to set its stop info.
const ScriptedProcess & m_scripted_process
lldb::RegisterContextSP GetRegisterContext() override
This base class provides an interface to stack frames.
Definition: StackFrame.h:43
std::shared_ptr< Generic > GenericSP
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
StateType
Process and Thread States.
std::shared_ptr< lldb_private::ScriptedThreadInterface > ScriptedThreadInterfaceSP
Definition: lldb-forward.h:411
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Definition: lldb-forward.h:392
uint64_t tid_t
Definition: lldb-types.h:84