[Lldb-commits] [lldb] 1ae6a78 - [lldb] Fix Debugger whitespace and formatting (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 13 20:50:44 PDT 2023


Author: Jonas Devlieghere
Date: 2023-06-13T20:50:30-07:00
New Revision: 1ae6a782f096a9870c3f5bd7c3489abeaa238d0f

URL: https://github.com/llvm/llvm-project/commit/1ae6a782f096a9870c3f5bd7c3489abeaa238d0f
DIFF: https://github.com/llvm/llvm-project/commit/1ae6a782f096a9870c3f5bd7c3489abeaa238d0f.diff

LOG: [lldb] Fix Debugger whitespace and formatting (NFC)

Remove trailing whitespace and fix formatting.

Added: 
    

Modified: 
    lldb/include/lldb/Core/Debugger.h
    lldb/source/Core/Debugger.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h
index 4005bdbddacca..64d9fad8de20d 100644
--- a/lldb/include/lldb/Core/Debugger.h
+++ b/lldb/include/lldb/Core/Debugger.h
@@ -52,7 +52,7 @@
 namespace llvm {
 class raw_ostream;
 class ThreadPool;
-}
+} // namespace llvm
 
 namespace lldb_private {
 class Address;
@@ -377,19 +377,19 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
   bool IsHandlingEvents() const { return m_event_handler_thread.IsJoinable(); }
 
   Status RunREPL(lldb::LanguageType language, const char *repl_options);
-  
+
   /// Interruption in LLDB:
-  /// 
+  ///
   /// This is a voluntary interruption mechanism, not preemptive.  Parts of lldb
-  /// that do work that can be safely interrupted call 
+  /// that do work that can be safely interrupted call
   /// Debugger::InterruptRequested and if that returns true, they should return
   /// at a safe point, shortcutting the rest of the work they were to do.
-  ///  
-  /// lldb clients can both offer a CommandInterpreter (through 
+  ///
+  /// lldb clients can both offer a CommandInterpreter (through
   /// RunCommandInterpreter) and use the SB API's for their own purposes, so it
   /// is convenient to separate "interrupting the CommandInterpreter execution"
-  /// and interrupting the work it is doing with the SB API's.  So there are two 
-  /// ways to cause an interrupt: 
+  /// and interrupting the work it is doing with the SB API's.  So there are two
+  /// ways to cause an interrupt:
   ///   * CommandInterpreter::InterruptCommand: Interrupts the command currently
   ///     running in the command interpreter IOHandler thread
   ///   * Debugger::RequestInterrupt: Interrupts are active on anything but the
@@ -398,7 +398,6 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
   /// Since the two checks are mutually exclusive, however, it's also convenient
   /// to have just one function to check the interrupt state.
 
-
   /// Bump the "interrupt requested" count on the debugger to support
   /// cooperative interruption.  If this is non-zero, InterruptRequested will
   /// return true.  Interruptible operations are expected to query the
@@ -406,13 +405,13 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
   /// if it returns \b true.
   ///
   void RequestInterrupt();
-  
+
   /// Decrement the "interrupt requested" counter.
   void CancelInterruptRequest();
-  
+
   /// This is the correct way to query the state of Interruption.
-  /// If you are on the RunCommandInterpreter thread, it will check the 
-  /// command interpreter state, and if it is on another thread it will 
+  /// If you are on the RunCommandInterpreter thread, it will check the
+  /// command interpreter state, and if it is on another thread it will
   /// check the debugger Interrupt Request state.
   ///
   /// \return
@@ -574,13 +573,13 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
   bool StartIOHandlerThread();
 
   void StopIOHandlerThread();
-  
+
   // Sets the IOHandler thread to the new_thread, and returns
   // the previous IOHandler thread.
   HostThread SetIOHandlerThread(HostThread &new_thread);
 
   void JoinIOHandlerThread();
-  
+
   bool IsIOHandlerThreadCurrentThread() const;
 
   lldb::thread_result_t IOHandlerThread();

diff  --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 6f43cc608c2ce..2487304dfc199 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -236,8 +236,10 @@ Status Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
       // use-color changed. Ping the prompt so it can reset the ansi terminal
       // codes.
       SetPrompt(GetPrompt());
-    } else if (property_path == g_debugger_properties[ePropertyUseSourceCache].name) {
-      // use-source-cache changed. Wipe out the cache contents if it was disabled.
+    } else if (property_path ==
+               g_debugger_properties[ePropertyUseSourceCache].name) {
+      // use-source-cache changed. Wipe out the cache contents if it was
+      // disabled.
       if (!GetUseSourceCache()) {
         m_source_file_cache.Clear();
       }
@@ -1707,7 +1709,7 @@ void Debugger::HandleProcessEvent(const EventSP &event_sp) {
 
     // Display running state changes first before any STDIO
     if (got_state_changed && !state_is_stopped) {
-      // This is a public stop which we are going to announce to the user, so 
+      // This is a public stop which we are going to announce to the user, so
       // we should force the most relevant frame selection here.
       Process::HandleProcessStateChangedEvent(event_sp, output_stream_sp.get(),
                                               SelectMostRelevantFrame,


        


More information about the lldb-commits mailing list