Revision 34046e68599d08a069954bb0443d5942b15a0db1 authored by Fabrice Le Fessant on 13 January 2014, 22:02:15 UTC, committed by Fabrice Le Fessant on 13 January 2014, 22:02:15 UTC
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_x86_asm@14399 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 11688b7
events.ml
(***********************************************************************)
(* *)
(* OCaml *)
(* *)
(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *)
(* OCaml port by John Malecki and Xavier Leroy *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* under the terms of the Q Public License version 1.0. *)
(* *)
(***********************************************************************)
(********************************* Events ******************************)
open Instruct
let get_pos ev =
match ev.ev_kind with
| Event_before -> ev.ev_loc.Location.loc_start
| Event_after _ -> ev.ev_loc.Location.loc_end
| _ -> ev.ev_loc.Location.loc_start
;;
(*** Current events. ***)
(* Event at current position *)
let current_event =
ref (None : debug_event option)
(* Current position in source. *)
(* Raise `Not_found' if not on an event (beginning or end of program). *)
let get_current_event () =
match !current_event with
| None -> raise Not_found
| Some ev -> ev
let current_event_is_before () =
match !current_event with
None ->
raise Not_found
| Some {ev_kind = Event_before} ->
true
| _ ->
false
Computing file changes ...