summaryrefslogtreecommitdiff
path: root/debugger/symbols.mli
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/symbols.mli
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/symbols.mli')
-rw-r--r--debugger/symbols.mli40
1 files changed, 30 insertions, 10 deletions
diff --git a/debugger/symbols.mli b/debugger/symbols.mli
index b1fc9d6f91..30728f5585 100644
--- a/debugger/symbols.mli
+++ b/debugger/symbols.mli
@@ -14,6 +14,8 @@
(* *)
(**************************************************************************)
+open Events
+
(* Modules used by the program. *)
val modules : string list ref
@@ -21,31 +23,49 @@ val modules : string list ref
* compiled *)
val program_source_dirs : string list ref
-(* Read debugging info from executable file *)
-val read_symbols : string -> unit
+(* Clear loaded symbols *)
+val clear_symbols : unit -> unit
+
+(* Read debugging info from executable or dynlinkable file
+ and associate with given code fragment *)
+val read_symbols : int -> string -> unit
+
+(* Add debugging info from memory and associate with given
+ code fragment *)
+val add_symbols : int -> Instruct.debug_event list list -> unit
+
+(* Erase debugging info associated with given code fragment *)
+val erase_symbols : int -> unit
-(* Flip "event" bit on all instructions *)
-val set_all_events : unit -> unit
+(* Return the list of all code fragments that have debug info associated *)
+val code_fragments : unit -> int list
+
+(* Flip "event" bit on all instructions in given fragment *)
+val set_all_events : int -> unit
(* Return event at given PC, or raise Not_found *)
(* Can also return pseudo-event at beginning of functions *)
-val any_event_at_pc : int -> Instruct.debug_event
+val any_event_at_pc : Debugcom.pc -> code_event
(* Return event at given PC, or raise Not_found *)
-val event_at_pc : int -> Instruct.debug_event
+val event_at_pc : Debugcom.pc -> code_event
+
(* Set event at given PC *)
-val set_event_at_pc : int -> unit
+val set_event_at_pc : Debugcom.pc -> unit
(* List the events in `module'. *)
-val events_in_module : string -> Instruct.debug_event list
+val events_in_module : string -> int * Instruct.debug_event list
+
+(* List the modules in given code fragment. *)
+val modules_in_code_fragment : int -> string list
(* First event after the given position. *)
(* --- Raise `Not_found' if no such event. *)
-val event_at_pos : string -> int -> Instruct.debug_event
+val event_at_pos : string -> int -> code_event
(* Closest event from given position. *)
(* --- Raise `Not_found' if no such event. *)
-val event_near_pos : string -> int -> Instruct.debug_event
+val event_near_pos : string -> int -> code_event
(* Recompute the current event *)
val update_current_event : unit -> unit