================
@@ -25,6 +25,42 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(ProcessFreeBSDKernelCore)
+namespace {
+
+#define LLDB_PROPERTIES_processfreebsdkernelcore
+#include "ProcessFreeBSDKernelCoreProperties.inc"
+
+enum {
+#define LLDB_PROPERTIES_processfreebsdkernelcore
+#include "ProcessFreeBSDKernelCorePropertiesEnum.inc"
+};
+
+class PluginProperties : public Properties {
+public:
+ static llvm::StringRef GetSettingName() {
+ return ProcessFreeBSDKernelCore::GetPluginNameStatic();
+ }
+
+ PluginProperties() : Properties() {
+ m_collection_sp =
std::make_shared<OptionValueProperties>(GetSettingName());
+ m_collection_sp->Initialize(g_processfreebsdkernelcore_properties_def);
+ }
+
+ ~PluginProperties() override = default;
+
+ bool GetReadOnly() const {
+ const uint32_t idx = ePropertyReadOnly;
+ return GetPropertyAtIndexAs<bool>(idx, true);
+ }
+};
+
+} // namespace
+
+static PluginProperties &GetGlobalPluginProperties() {
----------------
Nerixyz wrote:
Unless I'm missing something: These properties aren't added to the global ones
yet. That should be done in a `DebuggerInitialize` function, that you pass to
`PluginManager::RegisterPlugin`. See for example
[`PlatformWasm::DebuggerInitialize`](https://github.com/mchoo7/llvm-project/blob/b7c6d7687c89c6cb94123261d728ad8bc7a5f74f/lldb/source/Plugins/Platform/WebAssembly/PlatformWasm.cpp#L83-L91).
https://github.com/llvm/llvm-project/pull/183237
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits