3 ms·
>but it would still be nice to actually call rust functions I agree. > data-structures like maps opaquely instead of just their complex internals. Works for
by dannymi 3y ago
>but it would still be nice to actually call rust functions
I agree.
> data-structures like maps opaquely instead of just their complex internals.
Works for me:
use std::collections::HashMap;
fn main() {
let mut m = HashMap::<String, u32>::new();
m.insert("a".to_string(), 5);
m.insert("b".to_string(), 3);
println!("Hello, world!");
}
$ rust-gdb target/debug/t1
(gdb) b 7
(gdb) r
(gdb) print(m)
$3 = HashMap(size=2) = {["a"] = 5, ["b"] = 3}