diff --git a/DwarfSynth/Simplest.ml b/DwarfSynth/Simplest.ml index b041496..87248ee 100644 --- a/DwarfSynth/Simplest.ml +++ b/DwarfSynth/Simplest.ml @@ -378,8 +378,6 @@ let cleanup_fde (fde_changes: cfa_changes_fde) : cfa_changes_fde = let process_sub sub : subroutine_cfa_data = (** Extracts the `cfa_changes_fde` of a subroutine *) - Format.eprintf "Sub %s...@." @@ BStd.Sub.name sub ; - let cfg = BStd.Sub.to_cfg sub in let next_instr_graph = build_next_instr cfg in diff --git a/DwarfSynth/c_bindings/dwarf_write.c b/DwarfSynth/c_bindings/dwarf_write.c index e09db20..86110e7 100644 --- a/DwarfSynth/c_bindings/dwarf_write.c +++ b/DwarfSynth/c_bindings/dwarf_write.c @@ -260,7 +260,6 @@ static int process_section(struct internal_state* state, size_t *written /*, FILE *rela_f */) { size_t shndx = elf_ndxscn(s); - fprintf(stderr, "Processing section %lu\n", shndx); //D GElf_Sym text_sym; int text_sym_idx = find_section_symbol(state->elf, shndx, &text_sym); @@ -303,8 +302,6 @@ static int process_section(struct internal_state* state, { continue; } - fprintf(stderr, "FDE %lu belongs to this section\n", cur_fde->num); //D - struct dwarfw_fde fde = { .cie = &cie, .initial_location = cur_fde->initial_location, diff --git a/csmith/csmith_gen.sh b/csmith/csmith_gen.sh new file mode 100755 index 0000000..e89b090 --- /dev/null +++ b/csmith/csmith_gen.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +USAGE="$0 output_dir nb_tests" + +if [ "$#" -lt 2 ] ; then + >&2 echo -e "Missing argument(s). Usage:\n$USAGE" + exit 1 +fi + +DIR=$1 +NB_TESTS=$2 + +mkdir -p "$DIR" +echo -n ">>> " +for _num in $(seq 1 $NB_TESTS); do + num=$(printf "%02d" $_num) + echo -ne "\r>>> $num.c " + path="$DIR/$num" + csmith > "$path.c" + echo -ne "\r>>> $num.bin " + gcc -O2 -I/usr/include/csmith-2.3.0/ -w "$path.c" -o "$path.orig.bin" + objcopy --remove-section '.eh_frame' --remove-section '.eh_frame_hdr' \ + "$path.orig.bin" "$path.bin" + echo -ne "\r>>> $num.eh.bin " + ../synthesize_dwarf.sh "$path.bin" "$path.eh.bin" +done + +echo ""