From ac48235ec7485f659162d6220c8b4c7731505423 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 11 Nov 2014 18:42:51 +0100 Subject: Added functions for printing of the abbreviations. --- powerpc/PrintDiab.ml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'powerpc') diff --git a/powerpc/PrintDiab.ml b/powerpc/PrintDiab.ml index 59a2951e..7606cbcf 100644 --- a/powerpc/PrintDiab.ml +++ b/powerpc/PrintDiab.ml @@ -106,6 +106,10 @@ module Diab_System = let string_of_uleb v = Printf.sprintf " .uleb128 %d\n" v + + let abbrv_start_addr = ref (-1) + + let get_abbrv_start_addr () = !abbrv_start_addr let sibling_type_abbr = 0x13 let decl_file_type_abbr = 0x6 @@ -134,6 +138,26 @@ module Diab_System = let data_location_ref_type_abbr = 0x13 let bound_const_type_abbr = 0xf let bound_ref_type_abbr=0x13 + + + let abbrv_section_start oc = + fprintf oc " .section .debug_abbrev,,n\n"; + let lbl = new_label () in + abbrv_start_addr := lbl; + label oc lbl + + let abbrv_section_end oc = + fprintf oc " .section .debug_abbrev,,n\n"; + fprintf oc " .sleb128 0\n" + + let abbrv_prologue oc id = + fprintf oc " .section .debug_abbrev,,n\n"; + fprintf oc " .uleb128 %d\n" id + + let abbrv_epilogue oc = + fprintf oc " .uleb128 0\n"; + fprintf oc " .uleb128 0\n" + end:ABBRV_DEFS) end:SYSTEM) -- cgit