| ## require optimize=none | |
| [zxdb] b $main | |
| Created Breakpoint 1 @ $main | |
| Pending: No current matches for location. It will be matched against new | |
| processes and shared libraries. | |
| [zxdb] run-component fuchsia-pkg://fuchsia.com/zxdb_e2e_inferiors#meta/rust_functions.cm | |
| run-component won't work for many v2 components. See "help run-component". | |
| Launched Process 1 state=Running koid=?? name=rust_functions.cm component=rust_functions.cm | |
| Breakpoint 1 now matching 1 addrs for $main | |
| 🛑 on bp 1 rust_functions::main() • rust_functions.rs:?? | |
| # Simple types require no prerequisites to be passed. | |
| [zxdb] p add_two_ints(1, 3) | |
| 🛑 on bp 1 rust_functions::main() • rust_functions.rs:?? | |
| 4 | |
| # Initialize some local variables. | |
| [zxdb] until 86 | |
| 🛑 rust_functions::main() • rust_functions.rs:?? | |
| # Local variables with simple, built-in types can be passed by value. | |
| [zxdb] p add_two_ints(lhs, rhs) | |
| 🛑 rust_functions::main() • rust_functions.rs:?? | |
| 15 | |
| # Local variables have addresses that can be coerced. | |
| [zxdb] p add_int_refs(&lhs, &rhs) | |
| 🛑 rust_functions::main() • rust_functions.rs:?? | |
| 15 | |
| [zxdb] locals | |
| lhs = 7 | |
| rhs = 8 | |
| [zxdb] p swap_i32_refs(&lhs, &rhs) | |
| 🛑 rust_functions::main() • rust_functions.rs:?? | |
| [zxdb] locals | |
| lhs = 8 | |
| rhs = 7 | |
| # Initialize some more local variables. | |
| [zxdb] until 93 | |
| 🛑 rust_functions::main() • rust_functions.rs:?? | |
| [zxdb] locals | |
| s = SomeStruct{one: 1, two: 2, nums: vec![3, 4, 5, 6]} | |
| [zxdb] p do_some_stuff(&s) | |
| 🛑 rust_functions::main() • rust_functions.rs:?? | |
| void | |
| [zxdb] locals | |
| s = SomeStruct{one: 2, two: 4, nums: vec![3, 4, 5]} | |
| [zxdb] c | |
| Process 1 exited with code 0. |