LLDB mainline
ThreadFreeBSDKernel.h
Go to the documentation of this file.
1//===-- ThreadFreeBSDKernel.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_PROCESS_FREEBSDKERNEL_THREADFREEBSDKERNEL_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_THREADFREEBSDKERNEL_H
11
12#include "lldb/Target/Thread.h"
13
15public:
17 lldb::addr_t pcb_addr, std::string thread_name);
18
19 ~ThreadFreeBSDKernel() override;
20
21 void RefreshStateAfterStop() override;
22
24
27
28 const char *GetName() override {
29 if (m_thread_name.empty())
30 return nullptr;
31 return m_thread_name.c_str();
32 }
33
34 void SetName(const char *name) override {
35 if (name && name[0])
36 m_thread_name.assign(name);
37 else
38 m_thread_name.clear();
39 }
40
41protected:
42 bool CalculateStopInfo() override;
43
44private:
45 std::string m_thread_name;
48};
49
50#endif // LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_THREADFREEBSDKERNEL_H
lldb::RegisterContextSP m_thread_reg_ctx_sp
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
void SetName(const char *name) override
void RefreshStateAfterStop() override
lldb::RegisterContextSP GetRegisterContext() override
bool CalculateStopInfo() override
Ask the thread subclass to set its stop info.
const char * GetName() override
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
This base class provides an interface to stack frames.
Definition: StackFrame.h:43
uint64_t addr_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Definition: lldb-forward.h:392
uint64_t tid_t
Definition: lldb-types.h:84