aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/DebugInformation.ml3
-rw-r--r--powerpc/AsmToJSON.ml2
-rw-r--r--powerpc/TargetPrinter.ml36
3 files changed, 21 insertions, 20 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml
index 12ae835b..36138882 100644
--- a/debug/DebugInformation.ml
+++ b/debug/DebugInformation.ml
@@ -521,6 +521,7 @@ let add_lvar_scope f_id var_id s_id =
with Not_found -> ()
let insert_local_declaration sto id ty loc =
+ add_file (fst loc);
let ty = insert_type ty in
let var = {
lvar_name = id.name;
@@ -691,6 +692,6 @@ let init name =
Hashtbl.reset compilation_section_start;
Hashtbl.reset compilation_section_end;
Hashtbl.reset filenum;
+ all_files := StringSet.singleton name;
Hashtbl.reset diab_additional;
- all_files := StringSet.empty;
printed_vars := StringSet.empty;
diff --git a/powerpc/AsmToJSON.ml b/powerpc/AsmToJSON.ml
index 5764aa8f..b3464dc4 100644
--- a/powerpc/AsmToJSON.ml
+++ b/powerpc/AsmToJSON.ml
@@ -329,7 +329,7 @@ let p_section oc = function
| Section_string -> fprintf oc "{\"Section Name\":\"String\"}"
| Section_literal -> fprintf oc "{\"Section Name\":\"Literal\"}"
| Section_jumptable -> fprintf oc "{\"Section Name\":\"Jumptable\"}"
- | Section_user (s,w,e) -> fprintf oc "{\"Section Name\":%s,\"Writable\":%B,\"Executable\":%B}" s w e
+ | Section_user (s,w,e) -> fprintf oc "{\"Section Name\":\"%s\",\"Writable\":%B,\"Executable\":%B}" s w e
| Section_debug_info _
| Section_debug_abbrev
| Section_debug_loc -> () (* There should be no info in the debug sections *)
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml
index 96bb867a..579573b9 100644
--- a/powerpc/TargetPrinter.ml
+++ b/powerpc/TargetPrinter.ml
@@ -242,23 +242,6 @@ module Diab_System : SYSTEM =
let cfi_adjust oc delta = ()
let cfi_rel_offset oc reg ofs = ()
-
- let print_prologue oc =
- fprintf oc " .xopt align-fill-text=0x60000000\n"
-
- let print_epilogue oc =
- let end_label sec =
- fprintf oc "\n";
- fprintf oc " %s\n" sec;
- let label_end = new_label () in
- fprintf oc "%a:\n" label label_end;
- label_end
- and entry_label f =
- let label = new_label () in
- fprintf oc ".L%d: .d2filenum \"%s\"\n" label f;
- label
- and end_line () = fprintf oc " .d2_line_end\n" in
- Debug.compute_file_enum end_label entry_label end_line
let debug_section oc sec =
match sec with
@@ -286,7 +269,24 @@ module Diab_System : SYSTEM =
fprintf oc " .d2_line_start %s\n" line_name
else
()
-
+
+ let print_prologue oc =
+ fprintf oc " .xopt align-fill-text=0x60000000\n";
+ debug_section oc Section_text
+
+ let print_epilogue oc =
+ let end_label sec =
+ fprintf oc "\n";
+ fprintf oc " %s\n" sec;
+ let label_end = new_label () in
+ fprintf oc "%a:\n" label label_end;
+ label_end
+ and entry_label f =
+ let label = new_label () in
+ fprintf oc ".L%d: .d2filenum \"%s\"\n" label f;
+ label
+ and end_line () = fprintf oc " .d2_line_end\n" in
+ Debug.compute_file_enum end_label entry_label end_line
end