summaryrefslogtreecommitdiff
path: root/include/lldb/Target/StructuredDataPlugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target/StructuredDataPlugin.h')
-rw-r--r--include/lldb/Target/StructuredDataPlugin.h57
1 files changed, 19 insertions, 38 deletions
diff --git a/include/lldb/Target/StructuredDataPlugin.h b/include/lldb/Target/StructuredDataPlugin.h
index 5ea265b05420..b20bdb3b263a 100644
--- a/include/lldb/Target/StructuredDataPlugin.h
+++ b/include/lldb/Target/StructuredDataPlugin.h
@@ -1,9 +1,8 @@
//===-- StructuredDataPlugin.h ----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -17,7 +16,6 @@ namespace lldb_private {
class CommandObjectMultiword;
-// -----------------------------------------------------------------------------
/// Plugin that supports process-related structured data sent asynchronously
/// from the debug monitor (e.g. debugserver, lldb-server, etc.)
///
@@ -38,21 +36,17 @@ class CommandObjectMultiword;
/// and error streams such that the plugin can display something about the
/// event, at a time when the debugger ensures it is safe to write to the
/// output or error streams.
-// -----------------------------------------------------------------------------
class StructuredDataPlugin
: public PluginInterface,
public std::enable_shared_from_this<StructuredDataPlugin> {
public:
- virtual ~StructuredDataPlugin();
+ ~StructuredDataPlugin() override;
lldb::ProcessSP GetProcess() const;
- // -------------------------------------------------------------------------
// Public instance API
- // -------------------------------------------------------------------------
- // -------------------------------------------------------------------------
/// Return whether this plugin supports the given StructuredData feature.
///
/// When Process is informed of a list of process-monitor-supported
@@ -64,16 +58,14 @@ public:
/// features, and if that happens, there is a single plugin instance
/// created covering all of the mapped features for a given process.
///
- /// @param[in] type_name
+ /// \param[in] type_name
/// The name of the feature tag supported by a process.
/// e.g. "darwin-log".
///
- /// @return
+ /// \return
/// true if the plugin supports the feature; otherwise, false.
- // -------------------------------------------------------------------------
- virtual bool SupportsStructuredDataType(const ConstString &type_name) = 0;
+ virtual bool SupportsStructuredDataType(ConstString type_name) = 0;
- // -------------------------------------------------------------------------
/// Handle the arrival of asynchronous structured data from the process.
///
/// When asynchronous structured data arrives from the process monitor,
@@ -84,27 +76,25 @@ public:
/// value. This is the manner in which the data is routed to the proper
/// plugin instance.
///
- /// @param[in] process
+ /// \param[in] process
/// The process instance that just received the structured data.
/// This will always be the same process for a given instance of
/// a plugin.
///
- /// @param[in] type_name
+ /// \param[in] type_name
/// The name of the feature tag for the asynchronous structured data.
/// Note this data will also be present in the \b object_sp dictionary
/// under the string value with key "type".
///
- /// @param[in] object_sp
+ /// \param[in] object_sp
/// A shared pointer to the structured data that arrived. This must
/// be a dictionary. The only key required is the aforementioned
/// key named "type" that must be a string value containing the
/// structured data type name.
- // -------------------------------------------------------------------------
virtual void
- HandleArrivalOfStructuredData(Process &process, const ConstString &type_name,
+ HandleArrivalOfStructuredData(Process &process, ConstString type_name,
const StructuredData::ObjectSP &object_sp) = 0;
- // -------------------------------------------------------------------------
/// Get a human-readable description of the contents of the data.
///
/// In command-line LLDB, this method will be called by the Debugger
@@ -113,33 +103,29 @@ public:
/// nothing will be printed; otherwise, a newline will be added to the end
/// when displayed.
///
- /// @param[in] object_sp
+ /// \param[in] object_sp
/// A shared pointer to the structured data to format.
///
- /// @param[in] stream
+ /// \param[in] stream
/// The stream where the structured data should be pretty printed.
///
- /// @return
+ /// \return
/// The error if formatting the object contents failed; otherwise,
/// success.
- // -------------------------------------------------------------------------
virtual Status GetDescription(const StructuredData::ObjectSP &object_sp,
lldb_private::Stream &stream) = 0;
- // -------------------------------------------------------------------------
/// Returns whether the plugin's features are enabled.
///
/// This is a convenience method for plugins that can enable or disable
/// their functionality. It allows retrieval of this state without
/// requiring a cast.
///
- /// @param[in] type_name
+ /// \param[in] type_name
/// The name of the feature tag for the asynchronous structured data.
/// This is needed for plugins that support more than one feature.
- // -------------------------------------------------------------------------
- virtual bool GetEnabled(const ConstString &type_name) const;
+ virtual bool GetEnabled(ConstString type_name) const;
- // -------------------------------------------------------------------------
/// Allow the plugin to do work related to modules that loaded in the
/// the corresponding process.
///
@@ -147,24 +133,20 @@ public:
/// if they have any behavior they want to enable/modify based on loaded
/// modules.
///
- /// @param[in] process
+ /// \param[in] process
/// The process that just was notified of modules having been loaded.
/// This will always be the same process for a given instance of
/// a plugin.
///
- /// @param[in] module_list
+ /// \param[in] module_list
/// The list of modules that the process registered as having just
/// loaded. See \b Process::ModulesDidLoad(...).
- // -------------------------------------------------------------------------
virtual void ModulesDidLoad(Process &process, ModuleList &module_list);
protected:
- // -------------------------------------------------------------------------
// Derived-class API
- // -------------------------------------------------------------------------
StructuredDataPlugin(const lldb::ProcessWP &process_wp);
- // -------------------------------------------------------------------------
/// Derived classes must call this before attempting to hook up commands
/// to the 'plugin structured-data' tree.
///
@@ -172,10 +154,9 @@ protected:
/// StructuredDataPlugin derived classes are available for this debugger.
/// If this has already happened, this call is a no-op.
///
- /// @param[in] debugger
+ /// \param[in] debugger
/// The Debugger instance for which we're creating the required shared
/// components for the StructuredDataPlugin derived classes.
- // -------------------------------------------------------------------------
static void InitializeBasePluginForDebugger(Debugger &debugger);
private: