1995-09-14 04:53:55 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-09-14 04:53:55 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-09-14 04:53:55 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
|
|
|
(* The "trace" facility *)
|
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
open Format
|
|
|
|
|
1998-09-07 00:55:38 -07:00
|
|
|
type codeptr
|
|
|
|
|
1995-09-14 04:53:55 -07:00
|
|
|
type traced_function =
|
1998-09-07 00:55:38 -07:00
|
|
|
{ path: Path.t; (* Name under which it is traced *)
|
|
|
|
closure: Obj.t; (* Its function closure (patched) *)
|
|
|
|
actual_code: codeptr; (* Its original code pointer *)
|
|
|
|
instrumented_fun: codeptr -> Obj.t -> Obj.t -> Obj.t }
|
|
|
|
(* Printing function *)
|
1995-09-14 04:53:55 -07:00
|
|
|
|
|
|
|
val traced_functions: traced_function list ref
|
1996-04-29 06:24:01 -07:00
|
|
|
val is_traced: Obj.t -> Path.t option
|
1998-09-07 00:55:38 -07:00
|
|
|
val get_code_pointer: Obj.t -> codeptr
|
|
|
|
val set_code_pointer: Obj.t -> codeptr -> unit
|
1996-09-23 04:32:19 -07:00
|
|
|
val instrument_closure:
|
2010-01-22 04:48:24 -08:00
|
|
|
Env.t -> Longident.t -> formatter -> Types.type_expr ->
|
1998-09-07 00:55:38 -07:00
|
|
|
codeptr -> Obj.t -> Obj.t -> Obj.t
|
1995-09-14 04:53:55 -07:00
|
|
|
val print_trace: Obj.t -> Obj.t -> Obj.t
|