diff options
author | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2019-04-23 13:42:36 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2019-04-23 13:42:36 +0200 |
commit | 23f871b3faf89679414485c438ed211151bd99ce (patch) | |
tree | b1a3c480ca621b8c7dfecb430507e5ca0e72e88b /debug/DebugInformation.ml | |
parent | 04b822ca7eaf59a967b9b8f700104b78e77e5c98 (diff) | |
parent | 65ac4adf1fb1c2642a8e69d098049dfa2ab90e92 (diff) | |
download | compcert-23f871b3faf89679414485c438ed211151bd99ce.tar.gz compcert-23f871b3faf89679414485c438ed211151bd99ce.zip |
Problems with Dwarf ranges (#159)
Merge of branch dwarf-ranges
Diffstat (limited to 'debug/DebugInformation.ml')
-rw-r--r-- | debug/DebugInformation.ml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml index e3f5d98e..21c2ad19 100644 --- a/debug/DebugInformation.ml +++ b/debug/DebugInformation.ml @@ -553,7 +553,10 @@ let close_scope atom s_id lbl = | a::rest -> a,rest | _ -> assert false (* We must have an opening scope *) end in - let new_r = ({last_r with end_addr = Some lbl;})::rest in + let new_r = if last_r.start_addr = Some lbl then + rest + else + ({last_r with end_addr = Some lbl;})::rest in Hashtbl.replace scope_ranges s_id new_r with Not_found -> () @@ -632,12 +635,12 @@ let compute_gnu_file_enum f = let all_files_iter f = StringSet.iter f !all_files -let printed_vars: StringSet.t ref = ref StringSet.empty +let printed_symbols: StringSet.t ref = ref StringSet.empty -let is_variable_printed id = StringSet.mem id !printed_vars +let is_symbol_printed id = StringSet.mem id !printed_symbols -let variable_printed id = - printed_vars := StringSet.add id !printed_vars +let symbol_printed id = + printed_symbols := StringSet.add id !printed_symbols let init name = id := 0; @@ -660,7 +663,7 @@ let init name = Hashtbl.reset scope_ranges; Hashtbl.reset label_translation; all_files := StringSet.singleton name; - printed_vars := StringSet.empty + printed_symbols := StringSet.empty let default_debug = { @@ -690,6 +693,6 @@ let default_debug = exists_section = exists_section; remove_unused = remove_unused; remove_unused_function = remove_unused_function; - variable_printed = variable_printed; + symbol_printed = symbol_printed; add_diab_info = (fun _ _ _ _ -> ()); } |