Changeset 2789


Ignore:
Timestamp:
Mar 6, 2013, 3:48:19 PM (7 years ago)
Author:
campbell
Message:

Some changes to the driver to aid debugging.

Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • driver/build

    r2778 r2789  
    1414ocamlc -custom -g -I ../Deliverables/D2.2/8051/lib extracted.cmo  ../Deliverables/D2.2/8051/lib/libcparser.a ../Deliverables/D2.2/8051/lib/cparser.cma clightFromC.cmo clightParser.cmo error.cmo exec.cmo -o exec
    1515ocamlc -custom -g -I ../Deliverables/D2.2/8051/lib extracted.cmo  ../Deliverables/D2.2/8051/lib/libcparser.a ../Deliverables/D2.2/8051/lib/cparser.cma clightFromC.cmo clightParser.cmo error.cmo frontend.cmo -o frontend
    16 ocamlc -custom -g -I ../Deliverables/D2.2/8051/lib extracted.cmo  ../Deliverables/D2.2/8051/lib/libcparser.a ../Deliverables/D2.2/8051/lib/cparser.cma clightFromC.cmo clightParser.cmo clightPrinter.cmo IntelHex.cmo ASMPrinter.cmo error.cmo compiler.cmo -o compiler
     16ocamlc -custom -g -I ../Deliverables/D2.2/8051/lib extracted.cmo  ../Deliverables/D2.2/8051/lib/libcparser.a ../Deliverables/D2.2/8051/lib/cparser.cma clightFromC.cmo clightParser.cmo clightPrinter.cmo IntelHex.cmo ASMPrinter.cmo error.cmo cerco.cmo -o cerco
  • driver/clightPrinter.ml

    r2787 r2789  
    462462  | Init_float64 n -> fprintf p "%F,@ " n*)
    463463  | Init_space n -> fprintf p "/* skip %ld, */@ " (Int32.of_int (int_of_matitanat n))
    464   | Init_null _ -> fprintf p "0,@ "
     464  | Init_null -> fprintf p "0,@ "
    465465  | Init_addrof(symb, ofs) ->
    466466      let symb = nameof symb in
     
    477477  | Init_float64 n -> fprintf p "%F" n*)
    478478  | Init_space n -> fprintf p "/* skip %ld */" (Int32.of_int (int_of_matitanat n))
    479   | Init_null _ -> fprintf p "0"
     479  | Init_null -> fprintf p "0"
    480480  | Init_addrof(symb, ofs) ->
    481481      let symb = nameof symb in
  • driver/exec.ml

    r2773 r2789  
    2323
    2424let cl = ClightParser.process Sys.argv.(1) in
    25 let OK mid = Extracted.Compiler.front_end cl in
    26 let rtlabs = Extracted.Types.snd mid in
    2725let g = Extracted.Cexec.make_global cl in
    28 let OK s0 = Extracted.Cexec.make_initial_state cl in
     26let s0 =
     27  match Extracted.Cexec.make_initial_state cl with
     28  | OK o -> o
     29  | Error m -> failwith (Error.errormsg m)
     30in
    2931let r = run g s0 in
    3032exit (bv_to_int r)
  • driver/frontend.ml

    r2773 r2789  
    2323
    2424let cl = ClightParser.process Sys.argv.(1) in
    25 let OK mid = Extracted.Compiler.front_end cl in
     25let mid =
     26  match Extracted.Compiler.front_end cl with
     27  | OK o -> o
     28  | Error m -> failwith (Error.errormsg m)
     29in
    2630let rtlabs = Extracted.Types.snd mid in
    2731let g = Extracted.RTLabs_semantics.make_global rtlabs in
    28 let OK s0 = Extracted.RTLabs_semantics.make_initial_state rtlabs in
     32let s0 =
     33  match Extracted.RTLabs_semantics.make_initial_state rtlabs with
     34  | OK o -> o
     35  | Error m -> failwith (Error.errormsg m)
     36in
    2937let r = run g s0 in
    3038exit (bv_to_int r)
  • extracted/build

    r2773 r2789  
    55# Uses a GNU sed extension
    66for i in `ls *.ml untrusted/*.ml`; do basename $i | sed -e 's/\(.\)\(.*\)\.ml/\U\1\E\2/'; done > extracted.mlpack
    7 ocamlbuild -Is untrusted -cflag -g extracted.cmo
     7ocamlbuild -Is untrusted -tag debug extracted.cmo
Note: See TracChangeset for help on using the changeset viewer.