diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2016-08-19 02:52:07 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2016-08-19 02:52:07 +0000 |
commit | aef7de8492f482254b6bf8d61430ccfd5cda1199 (patch) | |
tree | b29c4ab0bac0642c2c766488e173646c7fabcc66 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | |
parent | e8529c28f1c109e0c5f7be3ff96b17248c69b9bb (diff) | |
download | bcm5719-llvm-aef7de8492f482254b6bf8d61430ccfd5cda1199.tar.gz bcm5719-llvm-aef7de8492f482254b6bf8d61430ccfd5cda1199.zip |
Add StructuredData plugin type; showcase with new DarwinLog feature
See docs/structured_data/StructuredDataPlugins.md for details.
differential review: https://reviews.llvm.org/D22976
reviewers: clayborg, jingham
llvm-svn: 279198
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index b041ecbf3da..54e70792175 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -547,6 +547,53 @@ public: void ServeSymbolLookups(lldb_private::Process *process); + //------------------------------------------------------------------ + /// Return the feature set supported by the gdb-remote server. + /// + /// This method returns the remote side's response to the qSupported + /// packet. The response is the complete string payload returned + /// to the client. + /// + /// @return + /// The string returned by the server to the qSupported query. + //------------------------------------------------------------------ + const std::string& + GetServerSupportedFeatures() const + { + return m_qSupported_response; + } + + //------------------------------------------------------------------ + /// Return the array of async JSON packet types supported by the remote. + /// + /// This method returns the remote side's array of supported JSON + /// packet types as a list of type names. Each of the results are + /// expected to have an Enable{type_name} command to enable and configure + /// the related feature. Each type_name for an enabled feature will + /// possibly send async-style packets that contain a payload of a + /// binhex-encoded JSON dictionary. The dictionary will have a + /// string field named 'type', that contains the type_name of the + /// supported packet type. + /// + /// There is a Plugin category called structured-data plugins. + /// A plugin indicates whether it knows how to handle a type_name. + /// If so, it can be used to process the async JSON packet. + /// + /// @return + /// The string returned by the server to the qSupported query. + //------------------------------------------------------------------ + lldb_private::StructuredData::Array* + GetSupportedStructuredDataPlugins(); + + //------------------------------------------------------------------ + /// Configure a StructuredData feature on the remote end. + /// + /// @see \b Process::ConfigureStructuredData(...) for details. + //------------------------------------------------------------------ + Error + ConfigureRemoteStructuredData(const ConstString &type_name, + const StructuredData::ObjectSP &config_sp); + protected: LazyBool m_supports_not_sending_acks; LazyBool m_supports_thread_suffix; @@ -617,6 +664,10 @@ protected: uint32_t m_gdb_server_version; // from reply to qGDBServerVersion, zero if qGDBServerVersion is not supported uint32_t m_default_packet_timeout; uint64_t m_max_packet_size; // as returned by qSupported + std::string m_qSupported_response; // the complete response to qSupported + + bool m_supported_async_json_packets_is_valid; + lldb_private::StructuredData::ObjectSP m_supported_async_json_packets_sp; bool GetCurrentProcessInfo (bool allow_lazy_pid = true); |