aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-21 19:13:07 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-21 19:13:07 +0200
commit4b9b0e8f988cdfa1f848919b41bfe24c6e9a052a (patch)
tree0068ca2f3c45ffb7e07db62d681ccd3b96bcb167 /debug
parenta34b64ee2e7a535ebc0fc731243ab520c4ba430f (diff)
parent9147350fdb47f3471ce6d9202b7c996f79ffab2d (diff)
downloadcompcert-kvx-4b9b0e8f988cdfa1f848919b41bfe24c6e9a052a.tar.gz
compcert-kvx-4b9b0e8f988cdfa1f848919b41bfe24c6e9a052a.zip
Merge branch 'debugscopes' into debug_locations
Conflicts: debug/CtoDwarf.ml debug/DwarfPrinter.ml
Diffstat (limited to 'debug')
-rw-r--r--debug/DwarfPrinter.ml8
-rw-r--r--debug/DwarfTypes.mli1
-rw-r--r--debug/DwarfUtil.ml1
3 files changed, 7 insertions, 3 deletions
diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml
index a0b16463..5e58e365 100644
--- a/debug/DwarfPrinter.ml
+++ b/debug/DwarfPrinter.ml
@@ -58,6 +58,8 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
let add_byte_size = add_abbr_entry (0xb,byte_size_type_abbr)
+ let add_member_size = add_abbr_entry (0xb,member_size_abbr)
+
let add_high_pc = add_abbr_entry (0x12,high_pc_type_abbr)
let add_low_pc = add_abbr_entry (0x11,low_pc_type_abbr)
@@ -153,7 +155,7 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
| DW_TAG_structure_type e ->
prologue 0x13;
add_attr_some e.structure_file_loc add_file_loc;
- add_attr_some e.structure_byte_size add_byte_size;
+ add_attr_some e.structure_byte_size add_member_size;
add_attr_some e.structure_declaration add_declaration;
add_attr_some e.structure_name add_name
| DW_TAG_subprogram e ->
@@ -184,7 +186,7 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
| DW_TAG_union_type e ->
prologue 0x17;
add_attr_some e.union_file_loc add_file_loc;
- add_attr_some e.union_byte_size add_byte_size;
+ add_attr_some e.union_byte_size add_member_size;
add_attr_some e.union_declaration add_declaration;
add_attr_some e.union_name add_name
| DW_TAG_unspecified_parameter e ->
@@ -246,7 +248,7 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
fprintf oc " .uleb128 %d\n" id;
output_string oc s;
fprintf oc " .uleb128 0\n";
- fprintf oc " .uleb128 0\n") abbrevs;
+ fprintf oc " .uleb128 0\n\n") abbrevs;
fprintf oc " .sleb128 0\n"
let debug_start_addr = ref (-1)
diff --git a/debug/DwarfTypes.mli b/debug/DwarfTypes.mli
index eb7d4060..b5be3121 100644
--- a/debug/DwarfTypes.mli
+++ b/debug/DwarfTypes.mli
@@ -242,6 +242,7 @@ module type DWARF_ABBREVS =
val name_type_abbr: int
val encoding_type_abbr: int
val byte_size_type_abbr: int
+ val member_size_abbr: int
val high_pc_type_abbr: int
val low_pc_type_abbr: int
val stmt_list_type_abbr: int
diff --git a/debug/DwarfUtil.ml b/debug/DwarfUtil.ml
index d5e72adb..4cd838b6 100644
--- a/debug/DwarfUtil.ml
+++ b/debug/DwarfUtil.ml
@@ -85,6 +85,7 @@ module DefaultAbbrevs =
let name_type_abbr = dw_form_string
let encoding_type_abbr = dw_form_data1
let byte_size_type_abbr = dw_form_data1
+ let member_size_abbr = dw_form_udata
let high_pc_type_abbr = dw_form_addr
let low_pc_type_abbr = dw_form_addr
let stmt_list_type_abbr = dw_form_data4