swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.11k stars 328 forks source link

[SR-14243] Swift LLDB on Windows - not possible to set a breakpoint #4323

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-14243
Radar None
Original Reporter stanislav.dombrovsky (JIRA User)
Type Bug
Environment Windows 10, January, 27 toolchain from [snapshots](https://swift.org/download/#snapshots)
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 2 | |Component/s | LLDB for Swift | |Labels | Bug | |Assignee | @compnerd | |Priority | Medium | md5: fb245344e39d48e3d8c8ae74a29e82f7

Issue Description:

I was using the January, 27 toolchain from snapshots on Windows 10. I can compile a simple executable, but source list LLDB command does not list any source location. It makes not possible to set any breakpoint in the code and stops us from having the working debugger on Windows in the CLion (and I believe, in any IDE that needs to debug Swift on Windows). Related issue is here.

compnerd commented 3 years ago

Quality of debug info is still an issue. The proper thing to do is to improve CodeView emission and get that fully covered.

swift-ci commented 2 years ago

Comment by Steven Van Impe (JIRA)

I ran into the same issue after trying to use CodeLLDB in Visual Studio Code on Windows (https://github.com/vadimcn/vscode-lldb/issues/566)

swift-ci commented 2 years ago

Comment by Steven Van Impe (JIRA)

I've noticed that when compiling in release mode, I can set breakpoints. However, without the Swift-specific LLDB, the variable names are mangled.

PseudonymPatel commented 1 year ago

Hello, have there has been any updates to lldb working properly in debug configuration? Still can only set source file line breakpoints in release configuration. I've been using release config with -Onone to debug, but I'd like to learn any better ways.

Thanks!