Skip to content

Latest commit

 

History

History

find_runtime_symbols

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
This script maps runtime addresses to symbol names.  It is robust over
Address Space Layout Randomization (ASLR) since it uses runtime addresses with
runtime mapping information (/proc/.../maps).
Like 'pprof --symbols' in gperftools <http://code.google.com/p/gperftools/>.


Step 1: Prepare symbol information.

It is required to collect symbol information before mapping runtime addresses
to symbol names.

./prepare_symbol_info.py /path/to/maps [/another/path/to/symbol_info_dir]

The required 'maps' file is /proc/.../maps of the process at runtime.


Step 2: Find symbols.

./find_runtime_symbols.py /path/to/symbol_info_dir < addresses.txt

'symbol_info_dir' is the result of the Step 1.
The stdin should be a list of hex addresses to map, one per line.

The results will be printed to stdout like 'pprof --symbols'.