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

breakpoints are not being triggered - [debugger crash] #127

Closed
jasonwilliams opened this issue Aug 17, 2018 · 9 comments
Closed

breakpoints are not being triggered - [debugger crash] #127

jasonwilliams opened this issue Aug 17, 2018 · 9 comments
Labels
cause:Other The cause of this issue is outside of this project.

Comments

@jasonwilliams
Copy link

jasonwilliams commented Aug 17, 2018

Which OS: MacOS High Sierra 10.13.6
Which extension version: CodeLLDB 0.8.9
Which LLDB version:

$ lldb --version
lldb-900.0.45
  Swift-4.0

Which VSCode version: Version 1.27.0-insider (1.27.0-insider)
Project https://github.com/jasonwilliams/boa

What is the problem and how did you get there:
Ive been setting up CodeLLDB to debug my Rust code, here is my launch.json

        {
            "type": "lldb",
            "request": "launch",
            "name": "Launch",
            "program": "${workspaceFolder}/target/debug/bin",
            "args": [],
            "cwd": "${workspaceFolder}",
            "sourceLanguages": [
                "rust"
            ],
            "stopOnEntry": true
        },

It seems to run without any errors, but the breakpoints don't get triggered, im all out of ideas.
I think it has something to do with my version of LLDB.

@jasonwilliams
Copy link
Author

im getting the same with lldb version 6.0.1 (installed with homebrew)

@jasonwilliams
Copy link
Author

jasonwilliams commented Aug 18, 2018

Update: They do trigger on VSCode stable (Version 1.26.1 (1.26.1)) but it crashes on most lines
Debug adapter process has terminated unexpectedly

@vadimcn
Copy link
Owner

vadimcn commented Aug 18, 2018

Yeah, I can repro the crash on your project. Looks like rustc generates something in the debug info that crashes LLDB. I am afraid this is out of my hands :(

@jasonwilliams
Copy link
Author

hi @vadimcn thanks for looking into this, i just want to check we've both hit the same bug.
I ran rust-lldb manually, to see what the issue was.

I went to the same breakpoint and inspected the variables within the frame. (lldb) frame variable
The error i got was:

error: need to add support for DW_TAG_base_type 'char' encoded with DW_ATE = 0x8, bit_size = 32
(js::syntax::lexer::Lexer *) self = &0x7ffeefbff560

Looks like this is linked to another issue within Rust itself here:
rust-lang/rust#29154

@jasonwilliams jasonwilliams changed the title breakpoints are not being triggered [High Sierra] breakpoints are not being triggered - [debugger crash] Aug 19, 2018
@vadimcn
Copy link
Owner

vadimcn commented Aug 19, 2018

No, I'm getting something slightly different:
error: bin DWARF DIE at 0x000073d8 (class Option<char>) has a member variable 0x000073df (RUST$ENCODED$ENUM$0$None) whose type is a forward declaration, not a complete definition.
...and then it crashes.

I have a newer LLDB, though (lldb-902.0.79.7)

@jasonwilliams
Copy link
Author

jasonwilliams commented Aug 20, 2018

@vadimcn i get the same error when i use lldb directly.
I was using rust-lldb before

This arises from rust-lang/rust#29154

@jasonwilliams
Copy link
Author

jasonwilliams commented Sep 18, 2018

Hi @vadimcn I’ve spoken to the Rust core team about this issue, and they are moving to their own wrapper of lldb (which has better rust support).
Will it be possible for users of this extension to choose which binary to use as well as this extension look for lldb on the system path?

See rust-lang/rust#29154

Rust team shipping their own lldb:
rust-lang/rust#53973

@vadimcn
Copy link
Owner

vadimcn commented Sep 18, 2018

Certainly. Just point lldb.executable to whatever lldb you want to use.

@vadimcn vadimcn added the cause:Other The cause of this issue is outside of this project. label Sep 24, 2018
@vadimcn
Copy link
Owner

vadimcn commented Nov 25, 2019

Codelldb now bundles its own liblldb, based on 9. I haven't seen any crashes in debug info parser lately.

@vadimcn vadimcn closed this as completed Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cause:Other The cause of this issue is outside of this project.
Projects
None yet
Development

No branches or pull requests

2 participants