diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-03-30 16:37:32 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-03-30 16:37:32 +0200 |
commit | b3de120011683866149ac2a9fbd0da38e2eef96c (patch) | |
tree | ffc6998a6651539befa513adb7b9a3bf56742f3b | |
parent | b3e77f00563656357af05052da2310d546145358 (diff) | |
download | compcert-kvx-b3de120011683866149ac2a9fbd0da38e2eef96c.tar.gz compcert-kvx-b3de120011683866149ac2a9fbd0da38e2eef96c.zip |
Added more comments and fixed issue in DwarfPrinter.mli
-rw-r--r-- | debug/DwarfPrinter.mli | 18 | ||||
-rw-r--r-- | debug/DwarfTypes.mli | 3 | ||||
-rw-r--r-- | debug/DwarfUtil.ml | 10 |
3 files changed, 21 insertions, 10 deletions
diff --git a/debug/DwarfPrinter.mli b/debug/DwarfPrinter.mli new file mode 100644 index 00000000..9e0e6693 --- /dev/null +++ b/debug/DwarfPrinter.mli @@ -0,0 +1,18 @@ +(* *********************************************************************) +(* *) +(* The Compcert verified compiler *) +(* *) +(* Bernhard Schommer, AbsInt Angewandte Informatik GmbH *) +(* *) +(* AbsInt Angewandte Informatik GmbH. All rights reserved. This file *) +(* is distributed under the terms of the INRIA Non-Commercial *) +(* License Agreement. *) +(* *) +(* *********************************************************************) + +open DwarfTypes + +module DwarfPrinter: functor (Target: DWARF_TARGET) -> functor (DwarfAbbrevs: DWARF_ABBREVS) -> + sig + val print_debug: out_channel -> dw_entry -> unit + end diff --git a/debug/DwarfTypes.mli b/debug/DwarfTypes.mli index d4fb0df9..c02558b5 100644 --- a/debug/DwarfTypes.mli +++ b/debug/DwarfTypes.mli @@ -228,7 +228,7 @@ type dw_entry = id: reference; } - +(* Module type for a matching from type to dwarf encoding *) module type DWARF_ABBREVS = sig val sibling_type_abbr: int @@ -259,6 +259,7 @@ module type DWARF_ABBREVS = val bound_ref_type_abbr: int end +(* The target specific functions for printing the debug information *) module type DWARF_TARGET= sig val label: out_channel -> int -> unit diff --git a/debug/DwarfUtil.ml b/debug/DwarfUtil.ml index fe4a0f7b..e2c87a9d 100644 --- a/debug/DwarfUtil.ml +++ b/debug/DwarfUtil.ml @@ -63,15 +63,6 @@ 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 @@ -95,6 +86,7 @@ let dw_form_ref8 = 0x14 let dw_ref_udata = 0x15 let dw_ref_indirect = 0x16 +(* Default corresponding encoding for the different abbreviations *) module DefaultAbbrevs = struct let sibling_type_abbr = dw_form_ref4 |