Step 1: build kernel bitcode
August 9, 2022 ยท View on GitHub
Download llvm-10.0.1 source code and build it with this patch applied to get a customized clang, then build kernel with our custimized clang to get unoptimized bitcode.
Step 2: build the analyzer
The analyzer depends on llvm-10, so make sure llvm-10 is installed. Follow here to install llvm-10.
sudo apt install libstdc++-10-dev to solve the issue of not finding lstdc++
Then run make to build the analyzer.
Step 3: Analyzing the kernel
Get call graph of crash report
python get_cg.py report
You will see a file named report_cg.txt
Then,
python run_analyze.py .
to generate objects identified in file sts.txt