diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-04-08 16:46:32 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-04-16 18:33:34 +0200 |
commit | bfadad2c55c2088ee66de974bf2ad98b051c92cc (patch) | |
tree | 87b76d413eba77fd9f3c878c6ae285566dfb11da /debug | |
parent | c4da57a29a710cf067fe8ce3663d0285efdfef0d (diff) | |
download | compcert-kvx-bfadad2c55c2088ee66de974bf2ad98b051c92cc.tar.gz compcert-kvx-bfadad2c55c2088ee66de974bf2ad98b051c92cc.zip |
Avoid generation of empty ranges.
As noted in the DWARF 3 specification empty ranges have no effect
and can be left out.
Bug 26234
Diffstat (limited to 'debug')
-rw-r--r-- | debug/DebugInformation.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml index e3f5d98e..4eff6548 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 -> () |