OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 reader.FormatIntPtr(start + size), | 1614 reader.FormatIntPtr(start + size), |
1615 size) | 1615 size) |
1616 print "Available memory regions:" | 1616 print "Available memory regions:" |
1617 self.reader.ForEachMemoryRegion(print_region) | 1617 self.reader.ForEachMemoryRegion(print_region) |
1618 | 1618 |
1619 | 1619 |
1620 EIP_PROXIMITY = 64 | 1620 EIP_PROXIMITY = 64 |
1621 | 1621 |
1622 CONTEXT_FOR_ARCH = { | 1622 CONTEXT_FOR_ARCH = { |
1623 MD_CPU_ARCHITECTURE_AMD64: | 1623 MD_CPU_ARCHITECTURE_AMD64: |
1624 ['rax', 'rbx', 'rcx', 'rdx', 'rdi', 'rsi', 'rbp', 'rsp', 'rip'], | 1624 ['rax', 'rbx', 'rcx', 'rdx', 'rdi', 'rsi', 'rbp', 'rsp', 'rip', |
| 1625 'r8', 'r9', 'r10', 'r11', 'r12', 'r13', 'r14', 'r15'], |
1625 MD_CPU_ARCHITECTURE_X86: | 1626 MD_CPU_ARCHITECTURE_X86: |
1626 ['eax', 'ebx', 'ecx', 'edx', 'edi', 'esi', 'ebp', 'esp', 'eip'] | 1627 ['eax', 'ebx', 'ecx', 'edx', 'edi', 'esi', 'ebp', 'esp', 'eip'] |
1627 } | 1628 } |
1628 | 1629 |
1629 | 1630 |
1630 def AnalyzeMinidump(options, minidump_name): | 1631 def AnalyzeMinidump(options, minidump_name): |
1631 reader = MinidumpReader(options, minidump_name) | 1632 reader = MinidumpReader(options, minidump_name) |
1632 heap = None | 1633 heap = None |
1633 DebugPrint("========================================") | 1634 DebugPrint("========================================") |
1634 if reader.exception is None: | 1635 if reader.exception is None: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 parser = optparse.OptionParser(USAGE) | 1698 parser = optparse.OptionParser(USAGE) |
1698 parser.add_option("-s", "--shell", dest="shell", action="store_true", | 1699 parser.add_option("-s", "--shell", dest="shell", action="store_true", |
1699 help="start an interactive inspector shell") | 1700 help="start an interactive inspector shell") |
1700 parser.add_option("-f", "--full", dest="full", action="store_true", | 1701 parser.add_option("-f", "--full", dest="full", action="store_true", |
1701 help="dump all information contained in the minidump") | 1702 help="dump all information contained in the minidump") |
1702 options, args = parser.parse_args() | 1703 options, args = parser.parse_args() |
1703 if len(args) != 1: | 1704 if len(args) != 1: |
1704 parser.print_help() | 1705 parser.print_help() |
1705 sys.exit(1) | 1706 sys.exit(1) |
1706 AnalyzeMinidump(options, args[0]) | 1707 AnalyzeMinidump(options, args[0]) |
OLD | NEW |