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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 offset = self.GetPageOffset(tagged_address) | 1414 offset = self.GetPageOffset(tagged_address) |
1415 lookup_key = (self.ContainingKnownOldSpaceName(tagged_address), offset) | 1415 lookup_key = (self.ContainingKnownOldSpaceName(tagged_address), offset) |
1416 known_obj_name = KNOWN_OBJECTS.get(lookup_key) | 1416 known_obj_name = KNOWN_OBJECTS.get(lookup_key) |
1417 if known_obj_name: | 1417 if known_obj_name: |
1418 return KnownObject(self, known_obj_name) | 1418 return KnownObject(self, known_obj_name) |
1419 if self.IsInKnownMapSpace(tagged_address): | 1419 if self.IsInKnownMapSpace(tagged_address): |
1420 known_map = self.SenseMap(tagged_address) | 1420 known_map = self.SenseMap(tagged_address) |
1421 if known_map: | 1421 if known_map: |
1422 return known_map | 1422 return known_map |
1423 found_obj = self.heap.FindObject(tagged_address) | 1423 found_obj = self.heap.FindObject(tagged_address) |
1424 if found_obj: return found_ob | 1424 if found_obj: return found_obj |
1425 address = tagged_address - 1 | 1425 address = tagged_address - 1 |
1426 if self.reader.IsValidAddress(address): | 1426 if self.reader.IsValidAddress(address): |
1427 map_tagged_address = self.reader.ReadUIntPtr(address) | 1427 map_tagged_address = self.reader.ReadUIntPtr(address) |
1428 map = self.SenseMap(map_tagged_address) | 1428 map = self.SenseMap(map_tagged_address) |
1429 if map is None: return None | 1429 if map is None: return None |
1430 instance_type_name = INSTANCE_TYPES.get(map.instance_type) | 1430 instance_type_name = INSTANCE_TYPES.get(map.instance_type) |
1431 if instance_type_name is None: return None | 1431 if instance_type_name is None: return None |
1432 cls = V8Heap.CLASS_MAP.get(instance_type_name, HeapObject) | 1432 cls = V8Heap.CLASS_MAP.get(instance_type_name, HeapObject) |
1433 return cls(self, map, address) | 1433 return cls(self, map, address) |
1434 return None | 1434 return None |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 parser = optparse.OptionParser(USAGE) | 1698 parser = optparse.OptionParser(USAGE) |
1699 parser.add_option("-s", "--shell", dest="shell", action="store_true", | 1699 parser.add_option("-s", "--shell", dest="shell", action="store_true", |
1700 help="start an interactive inspector shell") | 1700 help="start an interactive inspector shell") |
1701 parser.add_option("-f", "--full", dest="full", action="store_true", | 1701 parser.add_option("-f", "--full", dest="full", action="store_true", |
1702 help="dump all information contained in the minidump") | 1702 help="dump all information contained in the minidump") |
1703 options, args = parser.parse_args() | 1703 options, args = parser.parse_args() |
1704 if len(args) != 1: | 1704 if len(args) != 1: |
1705 parser.print_help() | 1705 parser.print_help() |
1706 sys.exit(1) | 1706 sys.exit(1) |
1707 AnalyzeMinidump(options, args[0]) | 1707 AnalyzeMinidump(options, args[0]) |
OLD | NEW |