60729
|
1 |
(* Title: Pure/ML/ml_debugger_dummy.ML
|
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
ML debugger interface -- dummy version.
|
|
5 |
*)
|
|
6 |
|
|
7 |
signature ML_DEBUGGER =
|
|
8 |
sig
|
|
9 |
type location
|
|
10 |
val on_entry: (string * location -> unit) option -> unit
|
|
11 |
val on_exit: (string * location -> unit) option -> unit
|
|
12 |
val on_exit_exception: (string * location -> exn -> unit) option -> unit
|
|
13 |
val on_break_point: (location * bool Unsynchronized.ref -> unit) option -> unit
|
|
14 |
type state
|
|
15 |
val state: Thread.thread -> state list
|
|
16 |
val debug_function: state -> string
|
|
17 |
val debug_function_arg: state -> ML_Name_Space.valueVal
|
|
18 |
val debug_function_result: state -> ML_Name_Space.valueVal
|
|
19 |
val debug_location: state -> location
|
|
20 |
val debug_name_space: state -> ML_Name_Space.T
|
|
21 |
end;
|
|
22 |
|
|
23 |
structure ML_Debugger: ML_DEBUGGER =
|
|
24 |
struct
|
|
25 |
|
|
26 |
(* hooks *)
|
|
27 |
|
|
28 |
type location = unit;
|
|
29 |
fun on_entry _ = ();
|
|
30 |
fun on_exit _ = ();
|
|
31 |
fun on_exit_exception _ = ();
|
|
32 |
fun on_break_point _ = ();
|
|
33 |
|
|
34 |
|
|
35 |
(* debugger *)
|
|
36 |
|
|
37 |
fun fail () = raise Fail "No debugger support on this ML platform";
|
|
38 |
|
|
39 |
type state = unit;
|
|
40 |
|
|
41 |
fun state _ = [];
|
|
42 |
fun debug_function () = fail ();
|
|
43 |
fun debug_function_arg () = fail ();
|
|
44 |
fun debug_function_result () = fail ();
|
|
45 |
fun debug_location () = fail ();
|
|
46 |
fun debug_name_space () = fail ();
|
|
47 |
|
|
48 |
end;
|
60730
|
49 |
|
|
50 |
|
|
51 |
fun ml_debugger_parameters (_: bool) = [];
|