From 56c5da69f66d097dde1ca50ec777df9953eb1952 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 26 Mar 2015 15:28:16 +0100 Subject: Compute the size of structs using the result of the packing and bitfield transformations. --- debug/DwarfUtil.ml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debug/DwarfUtil.ml') 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 -- cgit