tools/mac/symbolicate_crash.py
def PrettyPrintReport(report):
  """Takes a crash report and prints it like the crash server would."""
  print('Process    : ' + report.report_info['Process'])
  print('Version    : ' + report.report_info['Version'])
  print('Date       : ' + report.report_info['Date/Time'])
  print('OS Version : ' + report.report_info['OS Version'])
  print()
  if 'Crashed Thread' in report.report_info:
    print('Crashed Thread : ' + report.report_info['Crashed Thread'])
    print()
  if 'Event' in report.report_info:
    print('Event      : ' + report.report_info['Event'])
    print()

  for thread in report.threads:
    print()
    if thread.did_crash:
      exc_type = report.report_info['Exception Type'].split(' ')[0]
      exc_code = report.report_info['Exception Codes'].replace('at', '@')
      print('*CRASHED* ( ' + exc_type + ' / ' + exc_code + ' )')
    # Version 7 reports have spindump-style output (with a stepped stack trace),
    # so remove the first tab to get better alignment.
    if report.report_version == 7:
      for line in repr(thread).split('\n'):
        print(line.replace('\t', '  ', 1))
    else:
      print(thread)
Takes a crash report and prints it like the crash server would.
Takes a crash report and prints it like the crash server would.
Takes a crash report and prints it like the crash server would .
def PrettyPrintReport(report):
  print('Process    : ' + report.report_info['Process'])
  print('Version    : ' + report.report_info['Version'])
  print('Date       : ' + report.report_info['Date/Time'])
  print('OS Version : ' + report.report_info['OS Version'])
  print()
  if 'Crashed Thread' in report.report_info:
    print('Crashed Thread : ' + report.report_info['Crashed Thread'])
    print()
  if 'Event' in report.report_info:
    print('Event      : ' + report.report_info['Event'])
    print()
  for thread in report.threads:
    print()
    if thread.did_crash:
      exc_type = report.report_info['Exception Type'].split(' ')[0]
      exc_code = report.report_info['Exception Codes'].replace('at', '@')
      print('*CRASHED* ( ' + exc_type + ' / ' + exc_code + ' )')
    if report.report_version == 7:
      for line in repr(thread).split('\n'):
        print(line.replace('\t', '  ', 1))
    else:
      print(thread)
def PrettyPrintReport ( report ) : print ( 'Process    : ' + report . report_info [ 'Process' ] ) print ( 'Version    : ' + report . report_info [ 'Version' ] ) print ( 'Date       : ' + report . report_info [ 'Date/Time' ] ) print ( 'OS Version : ' + report . report_info [ 'OS Version' ] ) print ( ) if 'Crashed Thread' in report . report_info : print ( 'Crashed Thread : ' + report . report_info [ 'Crashed Thread' ] ) print ( ) if 'Event' in report . report_info : print ( 'Event      : ' + report . report_info [ 'Event' ] ) print ( ) for thread in report . threads : print ( ) if thread . did_crash : exc_type = report . report_info [ 'Exception Type' ] . split ( ' ' ) [ 0 ] exc_code = report . report_info [ 'Exception Codes' ] . replace ( 'at' , '@' ) print ( '*CRASHED* ( ' + exc_type + ' / ' + exc_code + ' )' ) if report . report_version == 7 : for line in repr ( thread ) . split ( '\n' ) : print ( line . replace ( '\t' , '  ' , 1 ) ) else : print ( thread )
Takes a crash report and prints it like the crash server would.
Takes a crash report and prints it like the crash server would .
"""Takes a crash report and prints it like the crash server would.""" # Version 7 reports have spindump-style output (with a stepped stack trace), # so remove the first tab to get better alignment.
report