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

Splitting Debuginfo #30

Open
Gankra opened this issue Oct 24, 2022 · 4 comments
Open

Splitting Debuginfo #30

Gankra opened this issue Oct 24, 2022 · 4 comments
Labels
feature request New feature or request help wanted Extra attention is needed

Comments

@Gankra
Copy link
Member

Gankra commented Oct 24, 2022

Another future killer app: properly setting the flags and running the tools to produce proper symbol/debuginfo files (similar to source maps, but for native code).

This comment covers a lot of useful details on the state of this stuff in rust.

Some quick notes:

Each platform has different formats for this:

  • windows pdb
  • apple dsym
  • linux dwp
  • breakpad (platform-agnostic) sym

Different platforms have different symbol servers:

To generate symbol files for rust you want to:

  • build a release binary
    • with opt-level=3 or w/e release is
    • with codegen-units=1
    • with LTO..?
  • with debug info cranked to max
  • if targetting breakpad: run dump_syms to get a .sym
  • strip the binary?

Then the user will want to:

  • grab the final debuginfo/symbol file
  • get the unique build ids that map the debuginfo to the binary (platform-specific, hopefully embedded in the file, but we should still get them out?)
  • upload it to a symbol server?
  • package it?
@Gankra Gankra added this to the future milestone Oct 24, 2022
@Gankra
Copy link
Member Author

Gankra commented Jan 12, 2023

We generate the pdb and upload it to the release, however we don't:

  • handle dsym (it's a directory so as it turns out we might need to zip it up)
  • handle dwp (upstream cargo issue, dwp's aren't quite ready for primetime)
  • grab ids (haven't bothered yet)

@Gankra
Copy link
Member Author

Gankra commented Jan 19, 2023

dwp is blocked on rust-lang/cargo#11572

dsyms would be nice to do before shipping...

@Gankra
Copy link
Member Author

Gankra commented Feb 1, 2023

The cargo issue was fixed (obvs needs to ride the trains) but rust-lang/rust#105991 is also an argument against using it.

@mstange
Copy link

mstange commented Feb 1, 2023

Some additional info for macOS symbol servers:
Yes, there is no symbol server scheme on macOS, but there are bunch of alternatives, including the ability to plug in a custom "find my dSYM" script, and also we can just decide on our own scheme.

The alternatives are described here: https://lldb.llvm.org/use/symbols.html

As for a macOS symbol server URL scheme, for the Mozilla symbol server I'm planning to use the following scheme: https://symbols.mozilla.org/uuid/D13BD7EC88D830C49C6BC4B34F2D9156/debuginfo.dSYM.tar.bz2

And then we can supply an off-the-shelf script for use with DBGShellCommands which supports this scheme, and also teach wholesym about it.

@Gankra Gankra modified the milestones: future, debuginfo-ready Feb 12, 2023
@Gankra Gankra added feature request New feature or request help wanted Extra attention is needed labels Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants