[Lldb-commits] [lldb] r367481 - [GDBRemote] Reflow comments and improve docs.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 13:47:44 PDT 2019


Author: jdevlieghere
Date: Wed Jul 31 13:47:44 2019
New Revision: 367481

URL: http://llvm.org/viewvc/llvm-project?rev=367481&view=rev
Log:
[GDBRemote] Reflow comments and improve docs.

Improved the GDB client base documentation while I was reading through
it. Looks like it got messed up during the automatic comment reflow a
while ago.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h?rev=367481&r1=367480&r2=367481&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h Wed Jul 31 13:47:44 2019
@@ -24,12 +24,10 @@ public:
     virtual void HandleAsyncMisc(llvm::StringRef data) = 0;
     virtual void HandleStopReply() = 0;
 
-    // =========================================================================
     /// Process asynchronously-received structured data.
     ///
     /// \param[in] data
     ///   The complete data packet, expected to start with JSON-async.
-    // =========================================================================
     virtual void HandleAsyncStructuredDataPacket(llvm::StringRef data) = 0;
   };
 
@@ -83,42 +81,48 @@ protected:
   virtual void OnRunPacketSent(bool first);
 
 private:
-  // Variables handling synchronization between the Continue thread and any
-  // other threads
-  // wishing to send packets over the connection. Either the continue thread has
-  // control over
-  // the connection (m_is_running == true) or the connection is free for an
-  // arbitrary number of
-  // other senders to take which indicate their interest by incrementing
-  // m_async_count.
-  // Semantics of individual states:
-  // - m_continue_packet == false, m_async_count == 0: connection is free
-  // - m_continue_packet == true, m_async_count == 0: only continue thread is
-  // present
-  // - m_continue_packet == true, m_async_count > 0: continue thread has
-  // control, async threads
-  //   should interrupt it and wait for it to set m_continue_packet to false
-  // - m_continue_packet == false, m_async_count > 0: async threads have
-  // control, continue
-  //   thread needs to wait for them to finish (m_async_count goes down to 0).
+  /// Variables handling synchronization between the Continue thread and any
+  /// other threads wishing to send packets over the connection. Either the
+  /// continue thread has control over the connection (m_is_running == true) or
+  /// the connection is free for an arbitrary number of other senders to take
+  /// which indicate their interest by incrementing m_async_count.
+  ///
+  /// Semantics of individual states:
+  ///
+  /// - m_continue_packet == false, m_async_count == 0:
+  ///   connection is free
+  /// - m_continue_packet == true, m_async_count == 0:
+  ///   only continue thread is present
+  /// - m_continue_packet == true, m_async_count > 0:
+  ///   continue thread has control, async threads should interrupt it and wait
+  ///   for it to set m_continue_packet to false
+  /// - m_continue_packet == false, m_async_count > 0:
+  ///   async threads have control, continue thread needs to wait for them to
+  ///   finish (m_async_count goes down to 0).
+  /// @{
   std::mutex m_mutex;
   std::condition_variable m_cv;
-  // Packet with which to resume after an async interrupt. Can be changed by an
-  // async thread
-  // e.g. to inject a signal.
+
+  /// Packet with which to resume after an async interrupt. Can be changed by
+  /// an async thread e.g. to inject a signal.
   std::string m_continue_packet;
-  // When was the interrupt packet sent. Used to make sure we time out if the
-  // stub does not
-  // respond to interrupt requests.
+
+  /// When was the interrupt packet sent. Used to make sure we time out if the
+  /// stub does not respond to interrupt requests.
   std::chrono::time_point<std::chrono::steady_clock> m_interrupt_time;
+
+  /// Number of threads interested in sending.
   uint32_t m_async_count;
+
+  /// Whether the continue thread has control.
   bool m_is_running;
-  bool m_should_stop; // Whether we should resume after a stop.
-  // end of continue thread synchronization block
 
-  // This handles the synchronization between individual async threads. For now
-  // they just use a
-  // simple mutex.
+  /// Whether we should resume after a stop.
+  bool m_should_stop;
+  /// @}
+
+  /// This handles the synchronization between individual async threads. For
+  /// now they just use a simple mutex.
   std::recursive_mutex m_async_mutex;
 
   bool ShouldStop(const UnixSignals &signals,




More information about the lldb-commits mailing list