Friday, June 08, 2018

Utilizing CTF in MDB from a binary

Having CTF compiled into binaries is very useful for debugging. Recently I wanted to print some structures by utilizing mdb and ctf from a binary which is not running and I didn't have a core file either. Helpful folks from Oracle suggested the below nice workaround:
# mdb /path/to/bin
> main:b
> ::run
> ::print -at rx_call
It sets a breakpoint at main(), then executes it but it stops when calling main(), at this stage CTF data is already loaded by linker.

No comments: