aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DwarfUtil.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-03-26 15:28:16 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-03-26 15:28:16 +0100
commit56c5da69f66d097dde1ca50ec777df9953eb1952 (patch)
tree2866b88eb8f99828c8ec275d3d35563379c2bac2 /debug/DwarfUtil.ml
parent4c81d739be2a2e409c7e76bac3e616c4415a1efd (diff)
downloadcompcert-kvx-56c5da69f66d097dde1ca50ec777df9953eb1952.tar.gz
compcert-kvx-56c5da69f66d097dde1ca50ec777df9953eb1952.zip
Compute the size of structs using the result of the packing and bitfield transformations.
Diffstat (limited to 'debug/DwarfUtil.ml')
-rw-r--r--debug/DwarfUtil.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/debug/DwarfUtil.ml b/debug/DwarfUtil.ml
index 7b81be4c..fe4a0f7b 100644
--- a/debug/DwarfUtil.ml
+++ b/debug/DwarfUtil.ml
@@ -63,6 +63,15 @@ let rec entry_fold f acc entry =
let acc = f acc entry.tag in
List.fold_left (entry_fold f) acc entry.children
+let rec entry_map f entry =
+ let t = f entry.tag in
+ let children = List.map (entry_map f) entry.children in
+ {
+ entry with
+ tag = t;
+ children = children;
+ }
+
(* Attribute form encoding *)
let dw_form_addr = 0x01
let dw_form_block2 = 0x03