LLDB mainline
ScriptedSyntheticChildrenPythonInterface.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSYNTHETICCHILDRENPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSYNTHETICCHILDRENPYTHONINTERFACE_H
11
13
15namespace lldb_private {
16
20 public PluginInterface {
21public:
23 ScriptInterpreterPythonImpl &interpreter);
24
25 llvm::Expected<StructuredData::GenericSP>
26 CreatePluginObject(llvm::StringRef class_name, ValueObject &backend) override;
27
28 llvm::SmallVector<AbstractMethodRequirement>
30 // Providers that never expose children (num_children == 0 / has_children ==
31 // False) legitimately don't implement get_child_at_index; LLDB simply
32 // won't call it. Treating any single method as required here is stricter
33 // than the pre-migration behavior and would reject those providers.
34 return {};
35 }
36
37 llvm::Expected<uint32_t> CalculateNumChildren(uint32_t max) override;
38
39 lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override;
40
41 llvm::Expected<uint32_t> GetIndexOfChildWithName(ConstString name) override;
42
44
45 bool MightHaveChildren() override;
46
48
50
51 static void Initialize();
52
53 static void Terminate();
54
55 static llvm::StringRef GetPluginNameStatic() {
56 return "ScriptedSyntheticChildrenPythonInterface";
57 }
58
59 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
60};
61} // namespace lldb_private
62
63#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSYNTHETICCHILDRENPYTHONINTERFACE_H
A uniqued constant string class.
Definition ConstString.h:40
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ValueObject &backend) override
llvm::Expected< uint32_t > GetIndexOfChildWithName(ConstString name) override
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP