components/crash/content/tools/dmp2minidump.py
def ProcessDump(dump_file, minidump_file):
  """Extracts the part of the dump file that minidump_stackwalk can read.

  The dump files generated by the breakpad integration multi-part form data
  that include the minidump as file attachment.

  Args:
    dump_file: the dump file that needs to be processed.
    minidump_file: the file to write the minidump to.
  """
  try:
    dump = open(dump_file, 'rb')
    boundary = dump.readline().strip()[2:]
    data = parse_multipart(dump, {'boundary': boundary})
  except:
    print('Failed to read dmp file %s' % dump_file)
    return

  if not 'upload_file_minidump' in data:
    print('Could not find minidump file in dump.')
    return

  f = open(minidump_file, 'w')
  f.write("\r\n".join(data['upload_file_minidump']))
  f.close()
Extracts the part of the dump file that minidump_stackwalk can read.

  The dump files generated by the breakpad integration multi-part form data
  that include the minidump as file attachment.

  Args:
    dump_file: the dump file that needs to be processed.
    minidump_file: the file to write the minidump to.
  
Extracts the part of the dump file that minidump_stackwalk can read.
The dump files generated by the breakpad integration multi-part form data
that include the minidump as file attachment.
Extracts the part of the dump file that minidump_stackwalk can read . The dump files generated by the breakpad integration multi - part form data that include the minidump as file attachment .
def ProcessDump(dump_file, minidump_file):
  try:
    dump = open(dump_file, 'rb')
    boundary = dump.readline().strip()[2:]
    data = parse_multipart(dump, {'boundary': boundary})
  except:
    print('Failed to read dmp file %s' % dump_file)
    return
  if not 'upload_file_minidump' in data:
    print('Could not find minidump file in dump.')
    return
  f = open(minidump_file, 'w')
  f.write("\r\n".join(data['upload_file_minidump']))
  f.close()
def ProcessDump ( dump_file , minidump_file ) : try : dump = open ( dump_file , 'rb' ) boundary = dump . readline ( ) . strip ( ) [ 2 : ] data = parse_multipart ( dump , { 'boundary' : boundary } ) except : print ( 'Failed to read dmp file %s' % dump_file ) return if not 'upload_file_minidump' in data : print ( 'Could not find minidump file in dump.' ) return f = open ( minidump_file , 'w' ) f . write ( "\r\n" . join ( data [ 'upload_file_minidump' ] ) ) f . close ( )
Extracts the part of the dump file that minidump_stackwalk can read.
Extracts the part of the dump file that minidump_stackwalk can read .
"""Extracts the part of the dump file that minidump_stackwalk can read.

  The dump files generated by the breakpad integration multi-part form data
  that include the minidump as file attachment.

  Args:
    dump_file: the dump file that needs to be processed.
    minidump_file: the file to write the minidump to.
  """
dump_file
the dump file that needs to be processed.
the dump file that needs to be processed .
minidump_file
the file to write the minidump to.
the file to write the minidump to .