-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: support dSYM symbolication in native_stack_traces #48767
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
Conversation
|
(just wanted to leave a note that I am on Easter break - I will be back next Tuesday) |
|
I started to take an initial look at this.
We are in luck here. We have actually recently added a Mach-O parser which might be good enough for our purposes here. It has somewhat different API from Elf/Dwarf but I think we can contort things enough to make them work. I am trying to prototype something up.
You can't extract these values from Though I think this question is moot if we start reading DWARF natively from |
Cool, I'll have a look.
Yeah, that was confusing to me because the original dwarf symbolization somehow reads them, e.g. sdk/pkg/native_stack_traces/lib/src/dwarf.dart Line 1265 in 84497e4
|
|
Looking forward to the PR! |
|
I hacked some stuff together to verify that we can actually read DWARF from Mach-O. See this CL: https://dart-review.googlesource.com/c/sdk/+/242108 Seems to work like a charm in my limited testing. This also uncovered some bugs in our implementation of DWARF reading. I am planning to take some time next week to clean this CL up. |
|
Hi @vaind, sorry about the delay, but if you could take a look at https://dart-review.googlesource.com/c/sdk/+/240645 and address the comments there (it's just about the TODOs), I think otherwise we can go with this initial cut as is and then I'll work on addressing any remaining open questions, for example, the TODOs you've written plus those issues noticed by Slava during his work on his CL. |
|
@sstrickl I am not sure we need @vaind's CL if we cleanup and land some form of dart-review.googlesource.com/c/sdk/+/242108? No need to shell out to |
|
Ah. Gotcha, I'll take a look at working on your CL specifically instead then. Sorry for the misunderstanding. |
Great, let me know if there's anything I should do @sstrickl |
|
@sstrickl is there a CL I can follow for this feature? Is it https://dart-review.googlesource.com/c/sdk/+/242108? Just noticed there hasn't been any update on it for weeks. |
This is part of #43612 - enabling Flutter users to
split-debug-infointodSYMand symbolize it back, usingflutter symbolizeor directly using the CLI tool innative_stack_traces.The general approach taken was proposed by @mraleph in this comment: #43612 (comment)
There are quite a few open questions here as well as in the Flutter tooling, but I'd like to get the feedback on this. There are two main pain points in this PR
dwarf.dartonly supports ELF format - that doesn't match the dwarf file contained in a dSYM container and it is beyond me to implement the dwarf parsing so the proposed solution uses a CLI toolatosget symbol names for individual addresses. This, however, loses the option to load the dwarf from a Uint8List, which is currently done by thefluttertool to allow unit testing.atos... any ideas? Currently they're parsed from the given stack trace (the second line already was before this PR).Additionally, I haven't seen any tests for the existing CLI tool. Hopefully, the CI will give me some feedback here.