From 8d2e4a51d56b7f4d3673a5132edd1adb37a14295 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 21 Aug 2015 15:21:36 +0200 Subject: Added symbol functions for printing of the location for global variables. --- debug/DwarfPrinter.ml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'debug/DwarfPrinter.ml') diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml index 70b68634..85efea6e 100644 --- a/debug/DwarfPrinter.ml +++ b/debug/DwarfPrinter.ml @@ -128,9 +128,9 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS): prologue 0x34; add_attr_some e.formal_parameter_file_loc add_file_loc; add_attr_some e.formal_parameter_artificial (add_abbr_entry (0x34,artificial_type_abbr)); - add_location e.formal_parameter_location buf; + add_location (get_location e.formal_parameter_id) buf; add_attr_some e.formal_parameter_name add_name; - add_location e.formal_parameter_segment buf; + add_location (get_segment_location e.formal_parameter_id) buf; add_type buf; add_attr_some e.formal_parameter_variable_parameter (add_abbr_entry (0x4b,variable_parameter_type_abbr)) | DW_TAG_label _ -> @@ -203,9 +203,9 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS): add_attr_some e.variable_file_loc add_file_loc; add_attr_some e.variable_declaration add_declaration; add_attr_some e.variable_external (add_abbr_entry (0x3f,external_type_abbr)); - add_location e.variable_location buf; + add_location (get_location e.variable_id) buf; add_name buf; - add_location e.variable_segment buf; + add_location (get_segment_location e.variable_id) buf; add_type buf | DW_TAG_volatile_type _ -> prologue 0x35; @@ -299,7 +299,7 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS): | LocSymbol s -> fprintf oc " .sleb128 5\n"; fprintf oc " .byte 3\n"; - fprintf oc " .4byte %s\n" s + fprintf oc " .4byte %a\n" symbol s | _ -> () let print_data_location oc dl = @@ -365,9 +365,9 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS): let print_formal_parameter oc fp = print_file_loc oc fp.formal_parameter_file_loc; print_opt_value oc fp.formal_parameter_artificial print_flag; - print_opt_value oc fp.formal_parameter_location print_loc; + print_opt_value oc (get_location fp.formal_parameter_id) print_loc; print_opt_value oc fp.formal_parameter_name print_string; - print_opt_value oc fp.formal_parameter_segment print_loc; + print_opt_value oc (get_segment_location fp.formal_parameter_id) print_loc; print_ref oc fp.formal_parameter_type; print_opt_value oc fp.formal_parameter_variable_parameter print_flag @@ -406,7 +406,7 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS): let addr = get_fun_addr sp.subprogram_name in print_file_loc oc sp.subprogram_file_loc; print_opt_value oc sp.subprogram_external print_flag; - print_opt_value oc sp.subprogram_frame_base print_loc; + print_opt_value oc (get_frame_base sp.subprogram_id) print_loc; print_opt_value oc addr print_subprogram_addr; print_string oc sp.subprogram_name; print_flag oc sp.subprogram_prototyped; @@ -439,9 +439,9 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS): print_file_loc oc var.variable_file_loc; print_opt_value oc var.variable_declaration print_flag; print_opt_value oc var.variable_external print_flag; - print_opt_value oc var.variable_location print_loc; + print_opt_value oc (get_location var.variable_id) print_loc; print_string oc var.variable_name; - print_opt_value oc var.variable_segment print_loc; + print_opt_value oc (get_segment_location var.variable_id) print_loc; print_ref oc var.variable_type let print_volatile_type oc vt = -- cgit