forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 348
🍒 [windows][lldb] implement system logging on Windows (#150213) #11315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
charles-zablit
wants to merge
4
commits into
swiftlang:swift/release/6.2.1
Choose a base branch
from
charles-zablit:charles-zablit/lldb/windows/fix-verbose-health-logs-windows-to-6.2
base: swift/release/6.2.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
charles-zablit
commented
Sep 4, 2025
- [windows][lldb] implement system logging on Windows llvm/llvm-project#150213
- [lldb][windows] remove duplicate implementation of UTF8ToUTF16 llvm/llvm-project#154424
- [lldb][windows] use OutputDebugStringA instead of c to log events llvm/llvm-project#156474
@swift-ci please test |
We have to wait until this PR gets merged: |
@swift-ci please test windows |
1 similar comment
@swift-ci please test windows |
This patch makes LLDB use the Event Viewer on Windows (equivalent of system logging on Darwin) rather than piping to the standard output (which was deactivated in ca0a524.
…154424) `std::wstring AnsiToUtf16(const std::string &ansi)` is a reimplementation of `llvm::sys::windows::UTF8ToUTF16`. This patch removes `AnsiToUtf16` and its usages entirely.
…vm#156474) In llvm#150213 we made use of the Event Viewer on Windows (equivalent of system logging on Darwin) rather than piping to the standard output. This turned out to be too verbose in practice, as the Event Viewer is developer oriented and not user oriented. This patch swaps the use of `ReportEventW` for `OutputDebugStringA`, allowing to use tools such as `DebugView` to record logs when we are interested in receiving them, rather than continuously writing to the buffer. Please see an example below: <img width="1253" height="215" alt="Screenshot 2025-09-02 at 16 07 03" src="https://github.com/user-attachments/assets/4a326e46-d8a4-4c99-8c96-1bee62da8d55" />
4cc61c4
to
d9a77b1
Compare
This reverts commit 53aa2dc.
@swift-ci please test |
adrian-prantl
approved these changes
Sep 15, 2025
@swift-ci test windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.