shaka-packager/tools/find_runtime_symbols
Kongqun Yang 0f24c7f9ac Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
..
tests Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
OWNERS Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
PRESUBMIT.py Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
README Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
find_runtime_symbols.py Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
prepare_symbol_info.py Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
proc_maps.py Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
reduce_debugline.py Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00
static_symbols.py Start with media/mp4, media/webm and base codes from Chromium. 2013-09-23 18:37:14 -07:00

README

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'.