summaryrefslogtreecommitdiff
path: root/debugger/events.ml
diff options
context:
space:
mode:
authorJacques-Henri Jourdan <jacques-henri.jourdan@normalesup.org>2019-05-02 17:05:15 +0200
committerJacques-Henri Jourdan <jacques-henri.jourdan@normalesup.org>2019-07-16 10:52:48 +0200
commit593f94055a72c8569e0f79833feb274a64241005 (patch)
tree0e0601d51cfa479f326e74e3e925eead74e518af /debugger/events.ml
parent430c20bb7812a4612101b4ed2f112e14fb2d1aee (diff)
downloadocaml-593f94055a72c8569e0f79833feb274a64241005.tar.gz
Dynlink support for ocamldebug
This commit adds dynlink support for ocamldebug. As a side effect, it also: - factorizes the various functions searching for a code fragment into one, called [caml_find_code_fragment]; - removes the [caml_register_code_fragment], which does not seem to be used anywhere, and which clearly should not be used by external code.
Diffstat (limited to 'debugger/events.ml')
-rw-r--r--debugger/events.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/debugger/events.ml b/debugger/events.ml
index a50eae0d60..3bad8b2f7e 100644
--- a/debugger/events.ml
+++ b/debugger/events.ml
@@ -18,6 +18,10 @@
open Instruct
+type code_event =
+ { ev_frag : int;
+ ev_ev : Instruct.debug_event }
+
let get_pos ev =
match ev.ev_kind with
| Event_before -> ev.ev_loc.Location.loc_start
@@ -30,7 +34,7 @@ let get_pos ev =
(* Event at current position *)
let current_event =
- ref (None : debug_event option)
+ ref (None : code_event option)
(* Current position in source. *)
(* Raise `Not_found' if not on an event (beginning or end of program). *)
@@ -43,7 +47,7 @@ let current_event_is_before () =
match !current_event with
None ->
raise Not_found
- | Some {ev_kind = Event_before} ->
+ | Some {ev_ev = {ev_kind = Event_before}} ->
true
| _ ->
false