[Lldb-commits] [lldb] [lldb][Windows] Support OutputDebugString (PR #196395)
via lldb-commits
lldb-commits at lists.llvm.org
Fri May 8 06:08:07 PDT 2026
================
@@ -0,0 +1,57 @@
+// REQUIRES: target-windows
+// RUN: %build --compiler=clang-cl -o %t.exe -- %s
+// RUN: %lldb -f %t.exe -o "log enable windows process" -o r -o q | FileCheck %s
+
+#include <Windows.h>
+#include <string>
+
+int main() {
+ OutputDebugStringA("My string\nnext line\nBut this doesn't have trailing newline|");
+ OutputDebugStringW(L"OutputDebugStringW with some emojis 🦎🐊🐢🐍\n");
+ OutputDebugStringW(L"Another W1\n");
+ OutputDebugStringW(L"Another W2\n");
+ OutputDebugStringA("Some A1\n");
+ OutputDebugStringA("Some A2\n");
+ OutputDebugStringA("Some A3\n");
+
+ std::wstring maxW((1 << 19) - 4, L'A');
+ maxW.push_back(L'B');
+ maxW.push_back(L'\n');
+ OutputDebugStringW(maxW.c_str());
+
+ Sleep(100);
----------------
Nerixyz wrote:
This particular sleep shouldn't be strictly necessary. However, the sleeps afterward are necessary to get LLDB to print the debug string _before_ it logs the error about the large strings.
https://github.com/llvm/llvm-project/pull/196395
More information about the lldb-commits
mailing list