Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / debugger / checkpoints.mli
blob17c1037aa21a294bf62dfab3c1cf9ba9c4d0aca3
1 (***********************************************************************)
2 (* *)
3 (* Objective Caml *)
4 (* *)
5 (* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *)
6 (* Objective Caml port by John Malecki and Xavier Leroy *)
7 (* *)
8 (* Copyright 1996 Institut National de Recherche en Informatique et *)
9 (* en Automatique. All rights reserved. This file is distributed *)
10 (* under the terms of the Q Public License version 1.0. *)
11 (* *)
12 (***********************************************************************)
14 (* $Id$ *)
16 (***************************** Checkpoints *****************************)
18 open Primitives
19 open Debugcom
21 (*** A type for checkpoints. ***)
23 type checkpoint_state =
24 C_stopped
25 | C_running of int64
27 (* `c_valid' is true if and only if the corresponding
28 * process is connected to the debugger.
29 * `c_parent' is the checkpoint whose process is parent
30 * of the checkpoint one (`root' if no parent).
31 * c_pid = 2 for root pseudo-checkpoint.
32 * c_pid = 0 for ghost checkpoints.
33 * c_pid = -1 for kill checkpoints.
35 type checkpoint =
36 {mutable c_time : int64;
37 mutable c_pid : int;
38 mutable c_fd : io_channel;
39 mutable c_valid : bool;
40 mutable c_report : report option;
41 mutable c_state : checkpoint_state;
42 mutable c_parent : checkpoint;
43 mutable c_breakpoint_version : int;
44 mutable c_breakpoints : (int * int ref) list;
45 mutable c_trap_barrier : int}
47 (*** Pseudo-checkpoint `root'. ***)
48 (* --- Parents of all checkpoints which have no parent. *)
49 val root : checkpoint
51 (*** Current state ***)
52 val checkpoints : checkpoint list ref
53 val current_checkpoint : checkpoint ref
55 val current_time : unit -> int64
56 val current_report : unit -> report option
57 val current_pc : unit -> int option
58 val current_pc_sp : unit -> (int * int) option