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

Rustc should emit name section for function names #70

Closed
edre opened this issue Feb 24, 2018 · 6 comments
Closed

Rustc should emit name section for function names #70

edre opened this issue Feb 24, 2018 · 6 comments

Comments

@edre
Copy link

edre commented Feb 24, 2018

Webassembly supports a special custom section called "name" to assign names to functions and locals to aid in runtime debugging. For example, the stack traces I get in chrome should have my actual function names instead of random ids. LLVM seems to have support for this, but there is no name section emitted from rustc in either debug or release mode.

https://play.rust-lang.org/?gist=61eee1e3c108ca6db8adf709897feacc&version=nightly

@fitzgen
Copy link
Member

fitzgen commented Feb 24, 2018

It does if you enable debugging symbols:

[profile.release]
debug = true

@edre
Copy link
Author

edre commented Feb 24, 2018

Why are debugging symbols not enabled by default in debug mode?

@fitzgen
Copy link
Member

fitzgen commented Feb 24, 2018

All of debug builds are semi-broken with wasm at the moment. I don't recommend using them.

@edre
Copy link
Author

edre commented Feb 24, 2018

In a future where debug builds are not broken, they're supposed to come with debugging symbols, right?

@fitzgen
Copy link
Member

fitzgen commented Feb 24, 2018

Yeah, I think so.

@edre
Copy link
Author

edre commented Feb 24, 2018

This issue probably doesn't need to be tracked separately then.

@edre edre closed this as completed Feb 24, 2018
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