inst_logger
This pintool logs instructions in a dynamic manner.
Setup Pin
./install_pin.sh
Build
make
Run
./pin-3.20-98437-gf02b61307-gcc-linux/pin -t src/obj-intel64/inst_logger.so -o ls.csv -main_only 1 -- /bin/ls
Result would be like:
...
0x55555555a7e1,push rax
0x55555555a7e2,push rsp
0x55555555a7e3,lea r8, ptr [rip+0x10d66]
0x55555555a7ea,lea rcx, ptr [rip+0x10cef]
0x55555555a7f1,lea rdi, ptr [rip-0x1a08]
0x55555555a7f8,call qword ptr [rip+0x1c7d2]
...
Options
-o
(required) : Output filename.-main_only
: When set to1
, logs instructions only in main binary. Otherwise, logs all instructions.- default :
1
, optional
- default :
-rel_addr
: When set to1
, logs offset from image top as instruction address.-main_only
must be set to1
to enable this option.- default :
0
, optional
- default :
ToDo
- Add option for relative address.
- Support AT&T syntax.
- Loging of memory read/write.