aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-08-19 16:15:37 -0700
committerPatrick Walton <[email protected]>2010-08-19 16:15:37 -0700
commit31aceda09eb0541c97a6adeaf41b041da3c7fd18 (patch)
tree141999f652ca94939b2bd787b65aa335e99194ec /src/boot
parentAdd some mangled stabs to help debugging on Windows (diff)
downloadrust-31aceda09eb0541c97a6adeaf41b041da3c7fd18.tar.xz
rust-31aceda09eb0541c97a6adeaf41b041da3c7fd18.zip
Export glue as stabs on Windows as well
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/be/pe.ml18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/boot/be/pe.ml b/src/boot/be/pe.ml
index 89c45c62..3e95be2c 100644
--- a/src/boot/be/pe.ml
+++ b/src/boot/be/pe.ml
@@ -785,18 +785,26 @@ let crate_exports (sem:Semant.ctxt) : pe_export array =
in
(* Make some fake symbol table entries to aid in debugging. *)
- let export_stab (node_id, fixup) =
- let name = Hashtbl.find sem.Semant.ctxt_all_item_names node_id in
+ let export_stab name fixup =
{
pe_export_name_fixup = new_fixup "export name fixup";
- pe_export_name = "rust$" ^ (Ast.sprintf_name () name);
+ pe_export_name = "rust$" ^ name;
pe_export_address_fixup = fixup
}
in
+ let export_stab_of_fn (node_id, fixup) =
+ let name = Hashtbl.find sem.Semant.ctxt_all_item_names node_id in
+ export_stab ("fn$" ^ (Semant.string_of_name name)) fixup
+ in
+ let export_stab_of_glue (glue, code) =
+ export_stab (Semant.glue_str sem glue) code.Semant.code_fixup
+ in
let stabs =
- let pairs = htab_pairs sem.Semant.ctxt_fn_fixups in
- Array.of_list (List.map export_stab pairs)
+ Array.of_list (List.concat [
+ (List.map export_stab_of_fn (htab_pairs sem.Semant.ctxt_fn_fixups));
+ (List.map export_stab_of_glue (htab_pairs sem.Semant.ctxt_glue_code))
+ ])
in
Array.concat