aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SystemInitializerFull.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2024-10-22 09:00:08 -0700
committerGitHub <noreply@github.com>2024-10-22 09:00:08 -0700
commitcd4b33c9a976543171bb7b3455c485f99cfe654b (patch)
tree477530e8af896cb50649493e685f14fc94d378bc /lldb/source/API/SystemInitializerFull.cpp
parentdb21bd4fa9bf40a9f6e7713bf674dcfaa48d1d5b (diff)
downloadllvm-cd4b33c9a976543171bb7b3455c485f99cfe654b.zip
llvm-cd4b33c9a976543171bb7b3455c485f99cfe654b.tar.gz
llvm-cd4b33c9a976543171bb7b3455c485f99cfe654b.tar.bz2
[lldb] Log errors to the system log if they would otherwise get dropped (#111911)
Log errors to the (always-on) system log if they would otherwise get dropped by LLDB_LOG_ERROR.
Diffstat (limited to 'lldb/source/API/SystemInitializerFull.cpp')
-rw-r--r--lldb/source/API/SystemInitializerFull.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index 8a992a6..31f3a9f 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -84,6 +84,9 @@ llvm::Error SystemInitializerFull::Initialize() {
// Use the Debugger's LLDBAssert callback.
SetLLDBAssertCallback(Debugger::AssertCallback);
+ // Use the system log to report errors that would otherwise get dropped.
+ SetLLDBErrorLog(GetLog(SystemLog::System));
+
LLDB_LOG(GetLog(SystemLog::System), "{0}", GetVersion());
return llvm::Error::success();