My working unpac repository
1(**************************************************************************)
2(* *)
3(* OCaml *)
4(* *)
5(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *)
6(* OCaml port by John Malecki and Xavier Leroy *)
7(* *)
8(* Copyright 1996 Institut National de Recherche en Informatique et *)
9(* en Automatique. *)
10(* *)
11(* All rights reserved. This file is distributed under the terms of *)
12(* the GNU Lesser General Public License version 2.1, with the *)
13(* special exception on linking described in the file LICENSE. *)
14(* *)
15(**************************************************************************)
16
17(****************************** Frames *********************************)
18
19open Events
20
21(* Current frame number *)
22val current_frame : int ref
23
24(* Fragment and event at selected position. *)
25val selected_event : code_event option ref
26
27(* Selected position in source (module, line, column). *)
28(* Raise `Not_found' if not on an event. *)
29val selected_point : unit -> string * int * int
30
31val selected_event_is_before : unit -> bool
32
33(* Select a frame. *)
34(* Raise `Not_found' if no such frame. *)
35(* --- Assume the currents events have already been updated. *)
36val select_frame : int -> unit
37
38(* Select a frame. *)
39(* Same as `select_frame' but raise no exception if the frame is not found. *)
40(* --- Assume the currents events have already been updated. *)
41val try_select_frame : int -> unit
42
43(* Return to default frame (frame 0). *)
44val reset_frame : unit -> unit
45
46(* Perform a stack backtrace.
47 Call the given function with the events for each stack frame,
48 or None if we've encountered a stack frame with no debugging info
49 attached. Stop when the function returns false, or frame with no
50 debugging info reached, or top of stack reached. *)
51val do_backtrace : (code_event option -> bool) -> unit
52
53(* Return the number of frames in the stack, or (-1) if it can't be
54 determined because some frames have no debugging info. *)
55val stack_depth : unit -> int