-
Notifications
You must be signed in to change notification settings - Fork 13.4k
::rt::backtrace Backtraces are not very useful on Mac #1650
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I think we can probably write our own backtrace function with libunwind. |
With a unit test I wasn't getting any frames at all with Mac OS 10.7.2 and rust 0.2. I'd really like them so I spent some time digging around and got it working until it hit the infamous __morestack function where it went into lala land. Here is what I did:
With that fail was giving me stuff that looked like: Here are some links to the backtrace Darwin code I modified: |
I did try running with gdb. When I used |
Backtraces are not useful on linux either:
produces:
It would be useful if they included function paths and line numbers for each frame. |
@Dretch can you get a good backtrace in gdb? (The RTS should still be able to print out a backtrace on its own, but gdb can be an ok stopgap for now.) |
@catamorphism running
|
Backtraces look better to me now, but we should have some sort of testing for this. Nominating for milestone 3, feature-complete |
#6823 is definitely related to this |
accepted for production-ready milestone |
Visiting for triage, email from 2013-09-02. So AFAICT, backtraces work better now under gdb on Mac OS X, but we have not closed this issue yet because there is no |
I believe this was removed actually. According to 494da5a this no longer exists (I think that changed with the new runtime). |
for posterity: the "right" way to do this now is just to use GDB, afaict. |
If I do
export RUST_LOG=rt.backtrace
and then compile and run the following program:I would expect to see a backtrace that mentions the functions main, x, y, and z. Instead, I get:
I've seen similar results when running other programs. The stack trace says something about
__morestack
but nothing about function calls corresponding to the code the user wrote.The text was updated successfully, but these errors were encountered: