Files
wehub-resource-sync f30f816e96
build-deb / build (push) Has been cancelled
build / build (5.2.0+ox, ubuntu_x64_8_cores, 231c88c2e564fdca40e15e750aacad5fb0887435) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:29:01 +08:00

28 lines
576 B
OCaml

open! Core
exception Test
let rec raise_after = function
| 0 -> raise Test
| n -> 1 + raise_after (n - 1)
;;
let command =
Command.basic
~summary:
"sample executable for tracing that unwinds 20 stack frames in an ocaml exception"
(let%map_open.Command () = return () in
fun () ->
Magic_trace.mark_start ();
let _sdf =
try raise_after 20 with
| Test ->
print_endline "123";
2
in
Magic_trace.take_snapshot_with_arg 7;
Core_unix.sleep 1)
;;
let () = Command_unix.run command