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
Remove PDB code and use symbolic_debuginfo for all platforms #433
Conversation
This parsese the PE header twice, but that's ok.
This eliminates the custom PDB parsing and relies on symbolic's PDB parsing instead.
- Pass on a symbol name to an argument-less function name. - Detect the parameter size from the @8 at the end of the symbol name.
Even if the symbol name is not MSVC-mangled, it's often a better choice for the function name. In the example I was looking at, the function name started with an underscore, and taking the name from the symbol stripped that underscore, which looked better. We don't strip underscores from function names normally, because function names are already expected to be clean.
They're not Linux-specific.
Remove lots of template parameters and traits because everything now has the same type. Make multi-file path use auto detection on the file type just like in the single-file path.
Otherwise we lose the size of the placeholder function, because publics don't have a size.
This is no longer needed because all file types now end up as ObjectInfo which can be merged with each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for this excellent work 👏
@@ -42,7 +41,7 @@ serde = "1.0" | |||
serde_json = "1.0" | |||
sha2 = "0.10" | |||
simplelog = { version = "0.12", optional = true, features = ["local-offset"] } | |||
symbolic = { version = "9", features = ["demangle", "cfi"] } | |||
symbolic = { git = "https://github.com/getsentry/symbolic", rev = "f0dc99bb400da20fed8a7a42d71d8206ffeee536", features = ["demangle", "cfi"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine but let's file a bug to turn this into a version when the fix gets a proper release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #438.
This restores the error handling from elf.rs from before mozilla#433 . That PR changed it to an unwrap because the PDB code was using unwrap. old elf.rs: https://github.com/mozilla/dump_syms/blob/de7cc440533b794f85ca4e1f10e26d918330140d/src/linux/elf.rs#L464-L466 old pdb.rs: https://github.com/mozilla/dump_syms/blob/de7cc440533b794f85ca4e1f10e26d918330140d/src/windows/pdb.rs#L254 We encounter this error for libmozavutil.so on certain Linux debug builds, see https://bugzilla.mozilla.org/show_bug.cgi?id=1783899#c6 .
Fixes #406.
Fixes #280.
This PR adds inline support for Windows.
It also removes 1500 lines of code at the same time.
I've ported the following features from the Windows code to the cross-platform code:
I've also upstreamed the following changes to symbolic:
I deleted the following code without replacement:
I've done a lot of comparisons of before/after .sym files.
The remaining differences I've found all fall in the following categories: