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

Linking to static native libraries loses the native library debug info #3899

Closed
brson opened this issue Nov 1, 2012 · 7 comments
Closed
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-linkage Area: linking into static, shared libraries and binaries P-low Low priority

Comments

@brson
Copy link
Contributor

brson commented Nov 1, 2012

I've noticed that when I link static native libraries to Rust crates we lose the debug info from the native libraries. I assume that there is some minimum we can do to signal to the linker that we really want to keep that information.

@graydon
Copy link
Contributor

graydon commented Mar 25, 2013

non-critical for 0.6, de-milestoning

@graydon
Copy link
Contributor

graydon commented May 29, 2013

Reproduced, but I have no idea why it's happening; if I copy the -Z print-link-args arguments and feed them to gcc by hand, this doesn't happen.

Nominating for production ready.

@graydon
Copy link
Contributor

graydon commented Jul 18, 2013

accepted for production-ready milestone

@emberian
Copy link
Member

emberian commented Sep 5, 2013

cc @michaelwoerister

@pnkfelix
Copy link
Member

Assigning P-low.

@emberian
Copy link
Member

cc @luqmana want to take a look at this?

@michaelwoerister
Copy link
Member

Cannot reproduce this anymore. My example program:

#[link(name = "somelib", kind = "static")]
extern {
    fn some_c_function();
}

fn main() {
    unsafe {
        some_c_function();
    }
}

I had no problem stepping into the C function some_c_function compiled with gcc. I don't think this issue exists anymore.

RalfJung pushed a commit to RalfJung/rust that referenced this issue Oct 27, 2024
Android: Added support for prctl handling thread names

Addresses the first part of rust-lang#3618.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-linkage Area: linking into static, shared libraries and binaries P-low Low priority
Projects
None yet
Development

No branches or pull requests

5 participants