Compare commits

..

6 commits

9 changed files with 51 additions and 0 deletions

BIN
demo.old/demo.bin Executable file

Binary file not shown.

BIN
demo.old/demo.bin.synth Executable file

Binary file not shown.

14
demo.old/demo.c Normal file
View file

@ -0,0 +1,14 @@
#include <stdio.h>
int bar(int x) {
printf("'Im %d; how many? %n\n", x, &x);
return x;
}
int foo() {
return bar(3);
}
int main() {
return foo();
}

12
demo.old/synth.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
SYNTHESIS_SCRIPT="../../../src/dwarf-synthesis/synthesize_dwarf.sh"
if [ "$#" -lt 1 ] ; then
>&2 echo -e "Missing argument: object file.\nUsage: $0 object.o"
exit 1
fi
objfile="$1"
$SYNTHESIS_SCRIPT "$objfile" "$objfile.synth"

2
demo/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
dwarf-synthesis
tests/data*

9
demo/Makefile Normal file
View file

@ -0,0 +1,9 @@
all:
@>&2 echo "Please provide an explicit target"
@exit 1
tests/data:
dd if=/dev/urandom of="$@" bs=512K count=4
clean:
rm -f tests/data.gz tests/gzip.synth

BIN
demo/tests/gzip Executable file

Binary file not shown.

7
src/dw_plt Normal file
View file

@ -0,0 +1,7 @@
30 24 34 FDE pc=004020..004040
DW_CFA_def_cfa_offset: 16
DW_CFA_advance_loc: 6 to 0000000000004026
DW_CFA_def_cfa_offset: 24
DW_CFA_advance_loc: 10 to 0000000000004030
DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus)
[...]

7
src/dw_plt_abbr Normal file
View file

@ -0,0 +1,7 @@
30 24 34 FDE pc=004020..004040
DW_CFA_def_cfa_offset: 16
DW_CFA_advance_loc: 6 to 0000000000004026
DW_CFA_def_cfa_offset: 24
DW_CFA_advance_loc: 10 to 0000000000004030
DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8;
DW_OP_breg16 (rip): 0; ...)