summaryrefslogtreecommitdiffstats
path: root/chrome/tools/process_dumps_linux.py
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-25 19:54:36 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-25 19:54:36 +0000
commitfe489194d1db1557458ec6c54210cbaea0ab7259 (patch)
treeae1bfa3cd2a7600b435ff27c5f2406fb338889f3 /chrome/tools/process_dumps_linux.py
parent8fa5d361f3b6269b5730c7390012804018885d9f (diff)
downloadchromium_src-fe489194d1db1557458ec6c54210cbaea0ab7259.zip
chromium_src-fe489194d1db1557458ec6c54210cbaea0ab7259.tar.gz
chromium_src-fe489194d1db1557458ec6c54210cbaea0ab7259.tar.bz2
Add an option to specify the module name
This is so that I can use this script for non-chrome sym files too, particularly pepper. R=thestig@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/6895044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/process_dumps_linux.py')
-rwxr-xr-xchrome/tools/process_dumps_linux.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/tools/process_dumps_linux.py b/chrome/tools/process_dumps_linux.py
index 5c29f43..26e37fd 100755
--- a/chrome/tools/process_dumps_linux.py
+++ b/chrome/tools/process_dumps_linux.py
@@ -15,7 +15,7 @@ import sys
import tempfile
-def VerifySymbolAndCopyToTempDir(symbol_file, temp_dir):
+def VerifySymbolAndCopyToTempDir(symbol_file, temp_dir, sym_module_name):
"""Verify the symbol file looks correct and copy it to the right place
in temp_dir.
@@ -31,7 +31,7 @@ def VerifySymbolAndCopyToTempDir(symbol_file, temp_dir):
# signature_line should look like:
# MODULE Linux x86 28D8A79A426807B5462CBA24F56746750 chrome
if (len(signature_line) == 5 and signature_line[0] == 'MODULE' and
- signature_line[1] == 'Linux' and signature_line[4] == 'chrome' and
+ signature_line[1] == 'Linux' and signature_line[4] == sym_module_name and
len(signature_line[3]) == 33):
dest = os.path.join(temp_dir, signature_line[4], signature_line[3])
os.makedirs(dest)
@@ -243,7 +243,8 @@ def main_linux(options, args):
dump_files.append(dump_file)
temp_dir = tempfile.mkdtemp(suffix='chromedump')
- if not VerifySymbolAndCopyToTempDir(symbol_file, temp_dir):
+ if not VerifySymbolAndCopyToTempDir(symbol_file, temp_dir,
+ options.sym_module_name):
print 'Cannot parse symbols.'
shutil.rmtree(temp_dir)
return 1
@@ -285,6 +286,9 @@ if '__main__' == __name__:
parser.add_option('', '--architecture', type='int', default=None,
help='Override automatic x86/x86-64 detection. '
'Valid values are 32 and 64')
+ parser.add_option('', '--sym-module-name', type='string', default='chrome',
+ help='The module name for the symbol file. '
+ 'Default: chrome')
(options, args) = parser.parse_args()