Author: Jonas Devlieghere
Date: 2024-05-03T09:45:16-07:00
New Revision: f9d91fbe86519f3083a9ae37b1e2038f6b8992a6

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

LOG: [lldb] Always emit diagnostic events to the system log (#90913)

Always emit diagnostic events to the system log so that they end up in
the sysdiagnose on Darwin.

Added: 
    

Modified: 
    lldb/source/Core/Debugger.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 065f70c3880aaa..976420a4344394 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1512,6 +1512,9 @@ void Debugger::ReportDiagnosticImpl(Severity severity, 
std::string message,
                                     std::optional<lldb::user_id_t> debugger_id,
                                     std::once_flag *once) {
   auto ReportDiagnosticLambda = [&]() {
+    // Always log diagnostics to the system log.
+    Host::SystemLog(severity, message);
+
     // The diagnostic subsystem is optional but we still want to broadcast
     // events when it's disabled.
     if (Diagnostics::Enabled())


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to