https://github.com/charles-l/binary-xray
a tool that shows which lines of code are executing in a binary in realtime
https://github.com/charles-l/binary-xray
binary-instrumentation debugging-tool linux
Last synced: 3 months ago
JSON representation
a tool that shows which lines of code are executing in a binary in realtime
- Host: GitHub
- URL: https://github.com/charles-l/binary-xray
- Owner: charles-l
- License: mit
- Created: 2023-02-20T17:02:24.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-20T17:17:15.000Z (about 2 years ago)
- Last Synced: 2025-02-16T10:34:49.755Z (3 months ago)
- Topics: binary-instrumentation, debugging-tool, linux
- Language: Zig
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# binary xray
Peek inside a binary to see which lines are executing in realtime.
Works on Linux with binaries built in debug mode.
https://user-images.githubusercontent.com/1291012/220166020-2725b953-20f5-48e9-a0b6-cec334201072.mp4
### building
Install dependencies
```
apt install binutils-dev
```Clone and build dynamorio. More instructions on [their website](https://dynamorio.org/page_building.html).
```
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/
```### usage
```
# 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
```