blob: 394c01dc571da6af5c15b954b6754e627c4d766e [file] [log] [blame]
## 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:??
# Rust functions need to be prepended with the module name. This will re-hit the
# user installed breakpoint.
[zxdb] p print_hello()
🛑 on bp 1 rust_functions::main() • rust_functions.rs:??
void
[zxdb] n
🛑 rust_functions::main() • rust_functions.rs:??
# Now it should stop at a generic breakpoint.
[zxdb] p nested_no_args()
🛑 rust_functions::main() • rust_functions.rs:??
void
# The global variable should be updated.
[zxdb] p SOME_GLOBAL
5
# And we should be at the same location as before.
[zxdb] f
▶ 0 rust_functions::main() • rust_functions.rs:??
[zxdb] p add_two_ints(1, 3)
🛑 rust_functions::main() • rust_functions.rs:??
4
[zxdb] c
Process 1 exited with code 0.