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

String values no longer accessible in debugger #53

Closed
TedDriggs opened this issue Jul 13, 2017 · 9 comments
Closed

String values no longer accessible in debugger #53

TedDriggs opened this issue Jul 13, 2017 · 9 comments

Comments

@TedDriggs
Copy link

Which OS: macOS 10.12.5
Which LLDB version (lldb -version): lldb-370.0.42 Swift-3.1
Which VSCode version (Help/About):
Which plugin version: 0.5.2

Previously, when on a breakpoint it was possible to see the contents of a string value as a string. Now, instead it shows as alloc::string::String, and there's no clear way to access the contents.

Expected: Ability to access the string's contents.

@vadimcn
Copy link
Owner

vadimcn commented Jul 13, 2017

@TedDriggs: are you sure it's alloc::string::String?
CodeLLDB knows how to display collections::string::String. If the namespace does not match, it will be displayed as a generic struct.

@TedDriggs
Copy link
Author

TedDriggs commented Jul 13, 2017

Yes, I'm 100% sure. I'm also now seeing alloc::vec::Vec<_>; I think that was different before too.

@TedDriggs
Copy link
Author

Is there a tactical change possible which adds alloc::string::String to the list of types that get the existing string treatment?

@vadimcn
Copy link
Owner

vadimcn commented Jul 17, 2017

It's possible, but I wonder how did String and Vec end up in the alloc:: namespace? Is that your own crate? Or does recent rustc mess up the debug info somehow?

@TedDriggs
Copy link
Author

This is happening to me in the racer source code. I don't see any strange imports or changes there, but it's definitely possible I missed something.

@vadimcn
Copy link
Owner

vadimcn commented Jul 17, 2017

What's the compiler version?
Also, running dwarfdump racer | grep String might help to clarify what's actually encoded in the debug info.

@TedDriggs
Copy link
Author

TedDriggs commented Jul 17, 2017

rustc 1.20.0-nightly (445077963 2017-06-20)

Where should I run dwarfdump?

Update: Got confirmation on IRC that this was moved in recent nightlies.

teddriggs: was String always located in alloc::string::String, or did it move from collections?
FenrirWolf: Moved from collections in recent nightlies
panicbit: teddriggs: Also, libcollections is only a facade for liballoc now
FenrirWolf: Apparently it's needed for this RFC to be implemented rust-lang/rfcs#1845

This looks like it will impact everything that was in collections, so you may want to treat those as equivalent for your purposes.

@vadimcn
Copy link
Owner

vadimcn commented Jul 18, 2017

Ah, hm, okay. I guess I'll need to add those aliases then.

For now, you can edit ~/.vscode/extensions/vadimcn.vscode-lldb-0.5.2/adapter/formatters/rust.py and change collections:: to alloc::.

@vadimcn
Copy link
Owner

vadimcn commented Jul 20, 2017

Fixed in 0.5.3

@vadimcn vadimcn closed this as completed Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants