diff options
Diffstat (limited to 'debug/DebugInformation.ml')
-rw-r--r-- | debug/DebugInformation.ml | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml index 8b6ec1ad..7866c339 100644 --- a/debug/DebugInformation.ml +++ b/debug/DebugInformation.ml @@ -774,9 +774,28 @@ let function_end atom loc = List.iter (close_range loc) !open_vars; open_vars:= [] -let compilation_section_start: (string,int) Hashtbl.t = Hashtbl.create 7 +let compilation_section_start: (string,int * int * int * string) Hashtbl.t = Hashtbl.create 7 let compilation_section_end: (string,int) Hashtbl.t = Hashtbl.create 7 +let add_compilation_section_start sec addr = + Hashtbl.add compilation_section_start sec addr + +let add_compilation_section_end sec addr = + Hashtbl.add compilation_section_end sec addr + +let exists_section sec = + Hashtbl.mem compilation_section_start sec + +let filenum: (string * string,int) Hashtbl.t = Hashtbl.create 7 + +let compute_file_enum end_label entry_label line_end = + Hashtbl.iter (fun sec (_,_,_,secname) -> + Hashtbl.add compilation_section_end sec (end_label secname); + StringSet.iter (fun file -> + let lbl = entry_label file in + Hashtbl.add filenum (sec,file) lbl) !all_files; + line_end ()) compilation_section_start + let init name = id := 0; file_name := name; @@ -790,4 +809,6 @@ let init name = Hashtbl.reset atom_to_local; Hashtbl.reset scope_to_local; Hashtbl.reset compilation_section_start; - Hashtbl.reset compilation_section_end + Hashtbl.reset compilation_section_end; + Hashtbl.reset filenum; + all_files := StringSet.empty |