Skip to content
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

Rust enum printing broken on Windows since Rust 1.65 #839

Open
MichaelMcDonnell opened this issue Dec 27, 2022 · 7 comments
Open

Rust enum printing broken on Windows since Rust 1.65 #839

MichaelMcDonnell opened this issue Dec 27, 2022 · 7 comments
Labels
platform:windows-msvc The issue is specific to windows-msvc ABI. See https://github.com/vadimcn/vscode-lldb/wiki/Windows

Comments

@MichaelMcDonnell
Copy link

OS: Windows_NT x64 10.0.19045
VSCode version: 1.74.2 (user setup)
CodeLLDB version: v1.8.1
Compiler: Rust 1.65.0
Debuggee: x86_64-windows-msvc

The CodeLLDB extension currently doesn't show Rust enumerations (sum type) correctly on Windows when using Rust 1.65 or newer. It worked fine in 1.64.

I noticed that enum$< is now enum2$<. It was changed in this commit that was part of Rust 1.65:
rust-lang/rust#98393

I have created a small example that can be used to reproduce the problem and it includes screenshots:
https://github.com/MichaelMcDonnell/enum_debug

Thank you!

@vadimcn
Copy link
Owner

vadimcn commented Dec 28, 2022

This one won't be fixed for a while. Lldb does not support accessing static class members, which is needed to decode new style msvc enums.
I suggest compiling for the -gnu ABI.

@MichaelMcDonnell
Copy link
Author

Ok, thanks! Is there an open issue for accessing static class members in the LLDB issue tracker?

@vadimcn
Copy link
Owner

vadimcn commented Dec 29, 2022

Not that I know of.

@vadimcn vadimcn added the platform:windows-msvc The issue is specific to windows-msvc ABI. See https://github.com/vadimcn/vscode-lldb/wiki/Windows label Mar 1, 2023
@Walnut356
Copy link

AFAIK this has been fixed in LLVM 18.0.0

@kaivol
Copy link

kaivol commented May 13, 2024

Are you sure about that?
It's still looks similar to this on my system with

rustc 1.78.0 (9b00956e5 2024-04-29)
binary: rustc
commit-hash: 9b00956e56009bab2aa15d7bff10916599e3d6d6
commit-date: 2024-04-29
host: x86_64-pc-windows-msvc
release: 1.78.0
LLVM version: 18.1.2

@Walnut356
Copy link

My bad on the wording - the LLVM issues blocking this from being fixed in codeLLDB have been resolved.

@kaivol
Copy link

kaivol commented May 14, 2024

Ah I see.
So that means I'll have to wait for CodeLLDB to make the actual fixes (after updating its LLDB version), right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:windows-msvc The issue is specific to windows-msvc ABI. See https://github.com/vadimcn/vscode-lldb/wiki/Windows
Projects
None yet
Development

No branches or pull requests

4 participants