aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DwarfPrinter.ml
diff options
context:
space:
mode:
Diffstat (limited to 'debug/DwarfPrinter.ml')
-rw-r--r--debug/DwarfPrinter.ml25
1 files changed, 15 insertions, 10 deletions
diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml
index 7f1caaf6..cd888a80 100644
--- a/debug/DwarfPrinter.ml
+++ b/debug/DwarfPrinter.ml
@@ -127,9 +127,9 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
prologue 0x5;
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 _ ->
@@ -202,9 +202,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;
@@ -294,7 +294,12 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
fprintf oc " .byte 0x%X\n" b
let print_loc oc loc =
- ()
+ match loc with
+ | LocSymbol s ->
+ fprintf oc " .sleb128 5\n";
+ fprintf oc " .byte 3\n";
+ fprintf oc " .4byte %a\n" symbol s
+ | _ -> ()
let print_data_location oc dl =
()
@@ -359,9 +364,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
@@ -400,7 +405,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;
@@ -433,9 +438,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 =