From 19e69e76b4608ab86819deb301409824400425a1 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 17 Nov 2014 13:33:17 +0100 Subject: Removed compile error and added dummy function for the printing of entries. --- debug/DwarfPrinter.ml | 12 +++++++++--- debug/DwarfUtil.ml | 5 ----- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'debug') diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml index 0c5fc96f..3e804532 100644 --- a/debug/DwarfPrinter.ml +++ b/debug/DwarfPrinter.ml @@ -54,6 +54,7 @@ module type DWARF_DEFS = val bound_ref_type_abbr: int (* Functions for the printing of the debug information *) val info_section_start: out_channel -> unit + val print_entry: out_channel -> dw_entry -> int -> unit val info_section_end: out_channel -> unit end @@ -309,8 +310,13 @@ module DwarfPrinter(Defs:DWARF_DEFS) : let print_debug oc entry = compute_abbrv entry; print_abbrv oc; - info_section_start oc; - - info_section_end oc + Defs.info_section_start oc; + entry_iter_sib (fun sib entry -> + let has_sib = match sib with + | None -> false + | Some _ -> true in + let abbrv = get_abbrv entry has_sib in + Defs.print_entry oc entry abbrv) entry; + Defs.info_section_end oc end) diff --git a/debug/DwarfUtil.ml b/debug/DwarfUtil.ml index 5bdba147..79516e65 100644 --- a/debug/DwarfUtil.ml +++ b/debug/DwarfUtil.ml @@ -44,11 +44,6 @@ let add_children entry child = {entry with children = child::entry.children;} -(* Iter over the tree in prefix order *) -let rec entry_iter f entry = - f entry.tag; - List.iter (entry_iter f) entry.children - let list_iter_with_next f list = let rec aux = (function | [] -> () -- cgit