-
Notifications
You must be signed in to change notification settings - Fork 257
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
Custom backtrace output for Fuchsia #245
Conversation
d4a9b67
to
8571cef
Compare
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.
Thanks! Is this something stable enough to build on CI as well? If not that's ok, but if it is it seems reasonable to run a smoke check there to ensure that future changes don't accidentally regress this.
Sure-- we can |
I see lots of dockerfiles and am not exactly sure how I'd set that up, though. |
Looks great to me! Some minor things:
Other than that seems all good to me! |
It may be useful as well to develop the libstd patch to use this in tandem, which should be possible by using |
It's got enough code it's worth checking now!
This commit refactors the support needed to print Fuchsia's backtraces to support all platforms as well. This ideally moves out the need to have different code for printing a backtrace in libstd and this crate, and now both can share the same implementation! The implementation should produce the same output on fuchsia, but for other platforms it should match the current output of the standard library, including the full/short configuration options.
Delegate printing of paths to the creator of `BacktraceFmt` since it's too unwieldy to implement here.
Ok I was struck with some inspiration while reading over this, and I hope you're ok that I went ahead and tacked on some more commits here. I'm hoping that these commits will also make it easier to integrate into libstd because we can basically just delete all of Mind taking a look and seeing how it works out? Do you think that the last few commits are too overzealous? |
Looks reasonable enough for me! I'll pull this down and test locally to make sure things still work. Did you think about how you want to handle cutting out things after |
Still good on my end! |
Yeah that was the one thing I left out since I don't think I've ever seen a backtrace get successfully truncated with that symbol, but it's harmelss enough to put back in and it probably should happen. Some filtering logic will still need to be in libstd like the max number of frames, but I think that's fine |
SGTM! |
Fuchsia can't do traditional target-side symbolization. Instead, it uses a custom format containing information about the current location of libraries in memory and the addresses of the stack frames.
r? @alexcrichton @JakeEhrlich