aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DwarfPrinter.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-22 19:44:47 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-22 19:44:47 +0200
commitd7f75509c290d871cb8cd8aa11a0be2923c9ef17 (patch)
tree5e1cfd9366ae875a5da7286d1912b7fab7454ce0 /debug/DwarfPrinter.ml
parent4b9b0e8f988cdfa1f848919b41bfe24c6e9a052a (diff)
downloadcompcert-kvx-d7f75509c290d871cb8cd8aa11a0be2923c9ef17.tar.gz
compcert-kvx-d7f75509c290d871cb8cd8aa11a0be2923c9ef17.zip
Record the scope structure during unblocking.
Instead of creating separate annotations for the local variables we call the Debug.add_lvar_scope and we construct a mapping from function id + scope id to scope information.
Diffstat (limited to 'debug/DwarfPrinter.ml')
-rw-r--r--debug/DwarfPrinter.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml
index 5e58e365..f3cfdc6e 100644
--- a/debug/DwarfPrinter.ml
+++ b/debug/DwarfPrinter.ml
@@ -132,10 +132,10 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
prologue 0xa;
add_low_pc buf;
add_name buf;
- | DW_TAG_lexical_block _ ->
+ | DW_TAG_lexical_block a ->
prologue 0xb;
- add_high_pc buf;
- add_low_pc buf
+ add_attr_some a.lexical_block_high_pc add_high_pc;
+ add_attr_some a.lexical_block_low_pc add_low_pc
| DW_TAG_member e ->
prologue 0xd;
add_attr_some e.member_file_loc add_file_loc;
@@ -373,8 +373,8 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
print_string oc tl.label_name
let print_lexical_block oc lb =
- print_ref oc lb.lexical_block_high_pc;
- print_ref oc lb.lexical_block_low_pc
+ print_opt_value oc lb.lexical_block_high_pc print_ref;
+ print_opt_value oc lb.lexical_block_low_pc print_ref
let print_member oc mb =
print_file_loc oc mb.member_file_loc;
@@ -488,7 +488,7 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
print_abbrev oc
(* Print the debug info section *)
- let print_debug_info oc entry =
+ let print_debug_info oc entry =
let debug_start = new_label () in
debug_start_addr:= debug_start;
fprintf oc" .section %s\n" (name_of_section Section_debug_info);