LLDB mainline
CPPLanguageRuntime.h
Go to the documentation of this file.
1//===-- CPPLanguageRuntime.h
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_LANGUAGERUNTIME_CPLUSPLUS_CPPLANGUAGERUNTIME_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_CPLUSPLUS_CPPLANGUAGERUNTIME_H
11
12#include <vector>
13
14#include "llvm/ADT/StringMap.h"
15
18#include "lldb/lldb-private.h"
19
20namespace lldb_private {
21
23public:
25 Lambda = 0,
29 };
30
38 };
39
42
43 static char ID;
44
45 bool isA(const void *ClassID) const override {
46 return ClassID == &ID || LanguageRuntime::isA(ClassID);
47 }
48
49 static bool classof(const LanguageRuntime *runtime) {
50 return runtime->isA(&ID);
51 }
52
55 }
56
57 static CPPLanguageRuntime *Get(Process &process) {
58 return llvm::cast_or_null<CPPLanguageRuntime>(
60 }
61
62 llvm::Error GetObjectDescription(Stream &str, ValueObject &object) override;
63
64 llvm::Error GetObjectDescription(Stream &str, Value &value,
65 ExecutionContextScope *exe_scope) override;
66
67 /// Obtain a ThreadPlan to get us into C++ constructs such as std::function.
68 ///
69 /// \param[in] thread
70 /// Current thrad of execution.
71 ///
72 /// \param[in] stop_others
73 /// True if other threads should pause during execution.
74 ///
75 /// \return
76 /// A ThreadPlan Shared pointer
78 bool stop_others) override;
79
80 bool IsAllowedRuntimeValue(ConstString name) override;
81protected:
82 // Classes that inherit from CPPLanguageRuntime can see and modify these
84
85private:
87 llvm::StringMap<CPPLanguageRuntime::LibCppStdFunctionCallableInfo>;
88
90};
91
92} // namespace lldb_private
93
94#endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_CPLUSPLUS_CPPLANGUAGERUNTIME_H
A section + offset based address class.
Definition: Address.h:62
llvm::Error GetObjectDescription(Stream &str, ValueObject &object) override
static bool classof(const LanguageRuntime *runtime)
bool IsAllowedRuntimeValue(ConstString name) override
Identify whether a name is a runtime value that should not be hidden by from the user interface.
llvm::StringMap< CPPLanguageRuntime::LibCppStdFunctionCallableInfo > OperatorStringToCallableInfoMap
LibCppStdFunctionCallableInfo FindLibCppStdFunctionCallableInfo(lldb::ValueObjectSP &valobj_sp)
lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread, bool stop_others) override
Obtain a ThreadPlan to get us into C++ constructs such as std::function.
bool isA(const void *ClassID) const override
static CPPLanguageRuntime * Get(Process &process)
lldb::LanguageType GetLanguageType() const override
OperatorStringToCallableInfoMap CallableLookupCache
A uniqued constant string class.
Definition: ConstString.h:40
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
virtual bool isA(const void *ClassID) const
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
LanguageRuntime * GetLanguageRuntime(lldb::LanguageType language)
Definition: Process.cpp:1557
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
Definition: lldb-forward.h:449
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480
LanguageType
Programming language type.
@ eLanguageTypeC_plus_plus
ISO C++:1998.
uint64_t addr_t
Definition: lldb-types.h:80
A line table entry class.
Definition: LineEntry.h:21