Peek inside a binary to see which lines are executing in realtime.
Works on Linux with binaries built in debug mode.
out.mp4
Install dependencies
apt install binutils-dev
Clone and build dynamorio. More instructions on their website.
git clone --recursive https://github.com/DynamoRIO/dynamorio.git
cd dynamorio && mkdir build && cd build
cmake ..
make -j
Build bx
.
git clone https://github.com/charles-l/binary-xray
cd binary-xray
zig build -Ddynamorio-build=/path/to/dynamorio/build/
# instrument the binary
drrun -c zig-out/lib/libbx.so function_to_instrument -- path/to/executable
# open the gui to observe which lines are executing
./zig-out/bin/bxgui