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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 bitfield = self.ReadByte(self.BitFieldOffset()) | 1216 bitfield = self.ReadByte(self.BitFieldOffset()) |
1217 bitfield2 = self.ReadByte(self.BitField2Offset()) | 1217 bitfield2 = self.ReadByte(self.BitField2Offset()) |
1218 p.Print("- %s, unused: %d, bf: %d, bf2: %d" % ( | 1218 p.Print("- %s, unused: %d, bf: %d, bf2: %d" % ( |
1219 INSTANCE_TYPES[self.ReadByte(self.InstanceTypeOffset())], | 1219 INSTANCE_TYPES[self.ReadByte(self.InstanceTypeOffset())], |
1220 self.ReadByte(self.UnusedPropertyFieldsOffset()), | 1220 self.ReadByte(self.UnusedPropertyFieldsOffset()), |
1221 bitfield, bitfield2)) | 1221 bitfield, bitfield2)) |
1222 | 1222 |
1223 p.Print("- kind: %s" % (self.Decode(3, 5, bitfield2))) | 1223 p.Print("- kind: %s" % (self.Decode(3, 5, bitfield2))) |
1224 | 1224 |
1225 bitfield3 = self.ObjectField(self.BitField3Offset()) | 1225 bitfield3 = self.ObjectField(self.BitField3Offset()) |
1226 p.Print("- EnumLength: %d NumberOfOwnDescriptors: %d OwnsDescriptors: %s" %
( | 1226 p.Print( |
1227 self.Decode(0, 11, bitfield3), | 1227 "- EnumLength: %d NumberOfOwnDescriptors: %d OwnsDescriptors: %s" % ( |
1228 self.Decode(11, 11, bitfield3), | 1228 self.Decode(0, 11, bitfield3), |
1229 self.Decode(25, 1, bitfield3))) | 1229 self.Decode(11, 11, bitfield3), |
| 1230 self.Decode(25, 1, bitfield3))) |
1230 p.Print("- IsShared: %s" % (self.Decode(22, 1, bitfield3))) | 1231 p.Print("- IsShared: %s" % (self.Decode(22, 1, bitfield3))) |
1231 p.Print("- FunctionWithPrototype: %s" % (self.Decode(23, 1, bitfield3))) | 1232 p.Print("- FunctionWithPrototype: %s" % (self.Decode(23, 1, bitfield3))) |
1232 p.Print("- DictionaryMap: %s" % (self.Decode(24, 1, bitfield3))) | 1233 p.Print("- DictionaryMap: %s" % (self.Decode(24, 1, bitfield3))) |
1233 | 1234 |
1234 descriptors = self.ObjectField(self.DescriptorsOffset()) | 1235 descriptors = self.ObjectField(self.DescriptorsOffset()) |
1235 if descriptors.__class__ == FixedArray: | 1236 if descriptors.__class__ == FixedArray: |
1236 DescriptorArray(descriptors).Print(p) | 1237 DescriptorArray(descriptors).Print(p) |
1237 else: | 1238 else: |
1238 p.Print("Descriptors: %s" % (descriptors)) | 1239 p.Print("Descriptors: %s" % (descriptors)) |
1239 | 1240 |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 options, args = parser.parse_args() | 2161 options, args = parser.parse_args() |
2161 if os.path.exists(options.objdump): | 2162 if os.path.exists(options.objdump): |
2162 disasm.OBJDUMP_BIN = options.objdump | 2163 disasm.OBJDUMP_BIN = options.objdump |
2163 OBJDUMP_BIN = options.objdump | 2164 OBJDUMP_BIN = options.objdump |
2164 else: | 2165 else: |
2165 print "Cannot find %s, falling back to default objdump" % options.objdump | 2166 print "Cannot find %s, falling back to default objdump" % options.objdump |
2166 if len(args) != 1: | 2167 if len(args) != 1: |
2167 parser.print_help() | 2168 parser.print_help() |
2168 sys.exit(1) | 2169 sys.exit(1) |
2169 AnalyzeMinidump(options, args[0]) | 2170 AnalyzeMinidump(options, args[0]) |
OLD | NEW |