diff options
author | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-03 09:27:57 +0000 |
---|---|---|
committer | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-03 09:27:57 +0000 |
commit | 7318e4b753e61ccdc8661503a4ba46b12afe3230 (patch) | |
tree | 12a553a76d04e16905993fe810ee4035b4d12420 /tools/find_runtime_symbols | |
parent | 8ba0f27fa68da8b997884a02ae055ee0f6e3ae50 (diff) | |
download | chromium_src-7318e4b753e61ccdc8661503a4ba46b12afe3230.zip chromium_src-7318e4b753e61ccdc8661503a4ba46b12afe3230.tar.gz chromium_src-7318e4b753e61ccdc8661503a4ba46b12afe3230.tar.bz2 |
Add an option to find source file names from runtime virtual addresses.
BUG=225343
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/13525002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/find_runtime_symbols')
-rwxr-xr-x | tools/find_runtime_symbols/prepare_symbol_info.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/find_runtime_symbols/prepare_symbol_info.py b/tools/find_runtime_symbols/prepare_symbol_info.py index 5289cb8..a7d6121 100755 --- a/tools/find_runtime_symbols/prepare_symbol_info.py +++ b/tools/find_runtime_symbols/prepare_symbol_info.py @@ -53,7 +53,10 @@ def _dump_command_result(command, output_dir_path, basename, suffix): return filename_out -def prepare_symbol_info(maps_path, output_dir_path=None, use_tempdir=False): +def prepare_symbol_info(maps_path, + output_dir_path=None, + use_tempdir=False, + use_source_file_name=False): """Prepares (collects) symbol information files for find_runtime_symbols. 1) If |output_dir_path| is specified, it tries collecting symbol information @@ -75,6 +78,8 @@ def prepare_symbol_info(maps_path, output_dir_path=None, use_tempdir=False): output_dir_path: A path to a directory where files are prepared. use_tempdir: If True, it creates a temporary directory when it cannot create a new directory. + use_source_file_name: If True, it adds reduced result of 'readelf -wL' + to find source file names. Returns: A pair of a path to the prepared directory and a boolean representing @@ -144,9 +149,11 @@ def prepare_symbol_info(maps_path, output_dir_path=None, use_tempdir=False): output_dir_path, os.path.basename(entry.name), '.readelf-e') if not readelf_e_filename: continue - readelf_reduced_debugline_filename = _dump_command_result( - 'readelf -wLW %s | %s' % (entry.name, REDUCE_DEBUGLINE_PATH), - output_dir_path, os.path.basename(entry.name), '.readelf-debugline') + readelf_reduced_debugline_filename = None + if use_source_file_name: + readelf_reduced_debugline_filename = _dump_command_result( + 'readelf -wLW %s | %s' % (entry.name, REDUCE_DEBUGLINE_PATH), + output_dir_path, os.path.basename(entry.name), '.readelf-debugline') files[entry.name] = {} files[entry.name]['nm'] = { |