Debugger Validation via Cross-Level Differential Debugging
DeVIL employs Cross-Level Differential Debugging (CLDD) to validate debugger toolchains. CLDD involves comparing traces of dynamic program states at different levels of debugging strategies, specifically source-level debugging and instruction-level debugging.
This project uses gcc, gdb, llvm and lldb. Go check them out if you don't have them locally installed:
apt install python3 gcc gdb llvm lldb
-
For a given c source program
test.c
, the command used for DeVIL over the GDB toolchain is:python3 main.py -s test.c --compiler='gcc' --debugger='gdb'
-
For a given c source program
test.c
, the command used for DeVIL over the LLDB toolchain is:python3 main.py -s test.c --compiler='clang' --debugger='lldb'
-
For a given folder
FilesDir
with multiple C source files, the command used for DeVIL over the GDB toolchain is:python3 main.py -s FilesDir --compiler='gcc' --debugger='gdb'
-
For a given folder
FilesDir
with multiple C source files, the command used for DeVIL over the LLDB toolchain is:python3 main.py -s FilesDir --compiler='clang' --debugger='lldb'
-
Note that, we recommend to use the parallel option when using our tool if your computer has multi-cores:
$ python3 main.py --parallel -s FilesDir --compiler='gcc' --debugger='gdb' $ python3 main.py --parallel -s FilesDir --compiler='clang' --debugger='lldb'
-
Let's take the gcc 12.1.0 testsuite for example
$ wget https://ftp.gnu.org/gnu/gcc/gcc-12.1.0/gcc-12.1.0.tar.gz $ tar -zxvf gcc-12.1.10.tar.gz $ python3 main.py -s gcc-12.1.1/gcc/testsuite --parallel --compiler='gcc' --debugger='gdb' $ python3 main.py -s gcc-12.1.1/gcc/testsuite --parallel --compiler='clang' --debugger='lldb'
The results will be save into the Expr
folder
step
folder saves the results for cross-level differential debuggingoptimization
folder saves the results for differential optimizations (SOTA)