Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4423)

Unified Diff: chrome/tools/process_dumps_linux.py

Issue 342030: Add a dump-file option to process_dumps_linux.py (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/process_dumps_linux.py
===================================================================
--- chrome/tools/process_dumps_linux.py (revision 30285)
+++ chrome/tools/process_dumps_linux.py (working copy)
@@ -222,12 +222,22 @@
return 1
symbol_time = os.path.getmtime(symbol_file)
- dump_dir = options.dump_dir
- if not dump_dir:
- dump_dir = GetCrashDumpDir()
- if not dump_dir:
- print 'Cannot find dump dir.'
- return 1
+ dump_files = []
+ if options.dump_file:
+ dump_files.append(options.dump_file)
+ else:
+ dump_dir = options.dump_dir
+ if not dump_dir:
+ dump_dir = GetCrashDumpDir()
+ if not dump_dir:
+ print 'Cannot find dump files.'
+ return 1
+ for dump_file in LocateFiles(pattern='*.dmp', root=dump_dir):
+ file_time = os.path.getmtime(dump_file)
+ if file_time < symbol_time:
+ # Ignore dumps older than symbol file.
+ continue
+ dump_files.append(dump_file)
temp_dir = tempfile.mkdtemp(suffix='chromedump')
if not VerifySymbolAndCopyToTempDir(symbol_file, temp_dir):
@@ -236,11 +246,7 @@
return 1
dump_count = 0
- for dump_file in LocateFiles(pattern='*.dmp', root=dump_dir):
- file_time = os.path.getmtime(dump_file)
- if file_time < symbol_time:
- # Ignore dumps older than symbol file.
- continue
+ for dump_file in dump_files:
processed_dump_file = ProcessDump(dump_file, temp_dir)
if not processed_dump_file:
continue
@@ -261,9 +267,13 @@
help='The directory where the processor is installed. '
'The processor is used to get stack trace from dumps. '
'Searches $PATH by default')
+ parser.add_option('', '--dump-file', type='string', default='',
+ help='The path of the dump file to be processed.'
+ 'Overwrites dump-path')
parser.add_option('', '--dump-dir', type='string', default='',
help='The directory where dump files are stored. '
- 'Searches the Chromium crash directory by default.')
+ 'Searches this directory if dump-file is not'
Lei Zhang 2009/10/28 23:17:25 nit, you need an extra space after not.
+ 'specified. Default is the Chromium crash directory.')
parser.add_option('', '--symbol-dir', default='',
help='The directory with the symbols file. [Required]')
parser.add_option('', '--architecture', type='int', default=None,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698