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

Make backtraces work on Redox, copying Unix implementation #43635

Merged
merged 3 commits into from Aug 15, 2017

Conversation

Projects
None yet
9 participants
@ids1024
Copy link
Contributor

ids1024 commented Aug 4, 2017

The backtrace/ directory here is the same as the Unix one, except for adding an implementation of get_executable_filename.

ids1024 added some commits Aug 4, 2017

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Aug 4, 2017

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)


#[cfg(any(target_os = "macos", target_os = "ios",
target_os = "emscripten"))]
#[path = "dladdr.rs"]

This comment has been minimized.

@NilSet

NilSet Aug 4, 2017

Contributor

Redox is never macos, so no need for dladdr.rs

This comment has been minimized.

@ids1024

ids1024 Aug 4, 2017

Author Contributor

True; I thought it might be best not to modify those files too much (I just changed get_executable_filename in mod.rs) so they can be easily synced with the Unix version, but otherwise several things could be removed.

The duplicated code is somewhat annoying; I don't think it's avoidable though.

This comment has been minimized.

@ids1024

ids1024 Aug 4, 2017

Author Contributor

I guess (multiple) entire files that are useless is probably a waste, so I've pushed a commit addressing this.

@ids1024 ids1024 force-pushed the ids1024:backtrace-redox branch from 60f4bcb to c15c63a Aug 4, 2017

@ids1024 ids1024 force-pushed the ids1024:backtrace-redox branch from c15c63a to 9d67d5a Aug 4, 2017

@arielb1

This comment has been minimized.

Copy link
Contributor

arielb1 commented Aug 8, 2017

ping @brson - be our rubber stamp

@jackpot51

This comment has been minimized.

Copy link
Contributor

jackpot51 commented Aug 11, 2017

@brson @arielb1 @shepmaster Any updates on this?

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Aug 15, 2017

Thanks @ids1024! Out of curiosity, where'd the changes to config.sub come from? We ideally like to stick pretty close to upstream, but if it's pretty easy to re-apply the changes to upstream that shouldn't be too bad.

@alexcrichton alexcrichton assigned alexcrichton and unassigned brson Aug 15, 2017

@ids1024

This comment has been minimized.

Copy link
Contributor Author

ids1024 commented Aug 15, 2017

I could change the config.sub modification to just the single line required for Redox, but I though it was best to just update it from GNU: http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob;f=config.sub

Future releases of libbacktrace will probably have that fix.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Aug 15, 2017

Ok I don't really know what config.sub is anyway but the commit message is at least clear enough to me of how to reproduce it!

In that case let's...

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 15, 2017

📌 Commit 9d67d5a has been approved by alexcrichton

@ids1024

This comment has been minimized.

Copy link
Contributor Author

ids1024 commented Aug 15, 2017

config.sub is used by autotools to get the canonical name of the system from the target triplet (trivial for most systems, but a few have several variations of their triplets that it needs to handle). It needs to be updated when new systems are added.

config.guess is similar; it guesses a target triplet based on uname output. That is only relevant for native compilation though.

TLDR: It's one of the weird and ugly things in autotools that seem awful, but does help with portability to various strange systems.

This update seems to add fuchsia as well, so if they decide to implement Rust backtraces they won't run into that (small) issue.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 15, 2017

⌛️ Testing commit 9d67d5a with merge f25c228...

bors added a commit that referenced this pull request Aug 15, 2017

Auto merge of #43635 - ids1024:backtrace-redox, r=alexcrichton
Make backtraces work on Redox, copying Unix implementation

The `backtrace/` directory here is the same as the Unix one, except for adding an implementation of `get_executable_filename`.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 15, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing f25c228 to master...

@bors bors merged commit 9d67d5a into rust-lang:master Aug 15, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@ids1024 ids1024 deleted the ids1024:backtrace-redox branch Oct 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.