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

Need proper debugging information #26

Closed
fitzgen opened this issue Jan 17, 2018 · 6 comments
Closed

Need proper debugging information #26

fitzgen opened this issue Jan 17, 2018 · 6 comments

Comments

@fitzgen
Copy link
Member

fitzgen commented Jan 17, 2018

Source maps only encode source location <--> object code location mappings, and optionally source text content. This doesn't provide for

  • recovering scopes, variables, and their current values (for a stepping debugger)

  • information about inlined functions (for size profilers and reconstructing the logical stack at any given code location)

  • how to format/display values of different types (pointers vs Box vs Vec etc)

  • a way to include a link to an expression evaluator, so the console can be used or conditions can be set on breakpoints

@est31
Copy link

est31 commented Jan 17, 2018

Related issue: rust-lang/rust#46765

Sooo we'd probably need to come up with an alternative to source maps then that then Firefox and Chrome and other browsers have to implement in their debuggers?

@fitzgen
Copy link
Member Author

fitzgen commented Jan 17, 2018

I think we could mostly adapt DWARF and use bytecode offset rather than pc. DWARF is very flexible.

@mgattozzi
Copy link
Contributor

We'd still have to get browsers to support DWARF somehow right?

@fitzgen
Copy link
Member Author

fitzgen commented Jan 17, 2018

We'd still have to get browsers to support DWARF somehow right?

Two replies:

  1. Depending on the tooling, a browser might not be involved at all, so it is more of an ecosystem thing. For example, a size profiler could be run from the command line and get very good info out of DWARF.

  2. We can probably get browsers to support DWARF if we push hard enough ;)

@mgattozzi
Copy link
Contributor

That's kind of what I was guessing would be the case but just wanted to confirm!

@alexcrichton
Copy link
Contributor

Now that we've upgraded LLVM that's actually dwarf info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants