Skip to content

Compiling crates with debugging symbols #13492

Closed
@artella-coding

Description

@artella-coding

It would be nice to be able to compile crates (such as "rand") with debugging symbols.

For example if I have :

extern crate rand;
use rand::{task_rng, Rng};

fn main() {
    let names = ["Alice", "Bob", "Carol"];
    for name in names.iter() {
        let v = task_rng().shuffle(~[1,2,3]);
        for num in v.iter() {
            println!("{:s} says: {:d}", *name, *num);
        }
    }
}

Then I can put a breakpoint at shuffle by doing :

rustc -g prog1.rs
gdb ./prog1
rbreak shuffle
run

However I cannot step into shuffle and nagivate the code of shuffle. See https://mail.mozilla.org/pipermail/rust-dev/2014-April/009495.html for more details. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions