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 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 if heap_object: | 1926 if heap_object: |
1927 heap_object.Print(Printer()) | 1927 heap_object.Print(Printer()) |
1928 else: | 1928 else: |
1929 print "Address cannot be interpreted as object!" | 1929 print "Address cannot be interpreted as object!" |
1930 | 1930 |
1931 def do_do_desc(self, address): | 1931 def do_do_desc(self, address): |
1932 """ | 1932 """ |
1933 Print a descriptor array in a readable format. | 1933 Print a descriptor array in a readable format. |
1934 """ | 1934 """ |
1935 start = int(address, 16) | 1935 start = int(address, 16) |
1936 if ((start & 1) == 1): start = start + 1 | 1936 if ((start & 1) == 1): start = start - 1 |
1937 DescriptorArray(FixedArray(self.heap, None, start)).Print(Printer()) | 1937 DescriptorArray(FixedArray(self.heap, None, start)).Print(Printer()) |
1938 | 1938 |
1939 def do_do_map(self, address): | 1939 def do_do_map(self, address): |
1940 """ | 1940 """ |
1941 Print a descriptor array in a readable format. | 1941 Print a descriptor array in a readable format. |
1942 """ | 1942 """ |
1943 start = int(address, 16) | 1943 start = int(address, 16) |
1944 if ((start & 1) == 1): start = start - 1 | 1944 if ((start & 1) == 1): start = start - 1 |
1945 Map(self.heap, None, start).Print(Printer()) | 1945 Map(self.heap, None, start).Print(Printer()) |
1946 | 1946 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 options, args = parser.parse_args() | 2163 options, args = parser.parse_args() |
2164 if os.path.exists(options.objdump): | 2164 if os.path.exists(options.objdump): |
2165 disasm.OBJDUMP_BIN = options.objdump | 2165 disasm.OBJDUMP_BIN = options.objdump |
2166 OBJDUMP_BIN = options.objdump | 2166 OBJDUMP_BIN = options.objdump |
2167 else: | 2167 else: |
2168 print "Cannot find %s, falling back to default objdump" % options.objdump | 2168 print "Cannot find %s, falling back to default objdump" % options.objdump |
2169 if len(args) != 1: | 2169 if len(args) != 1: |
2170 parser.print_help() | 2170 parser.print_help() |
2171 sys.exit(1) | 2171 sys.exit(1) |
2172 AnalyzeMinidump(options, args[0]) | 2172 AnalyzeMinidump(options, args[0]) |
OLD | NEW |