Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: tools/grokdump.py

Issue 22852021: grokdump: fix Oddball printing (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 def __init__(self, heap, map, address): 1131 def __init__(self, heap, map, address):
1132 HeapObject.__init__(self, heap, map, address) 1132 HeapObject.__init__(self, heap, map, address)
1133 self.to_string = self.ObjectField(self.ToStringOffset()) 1133 self.to_string = self.ObjectField(self.ToStringOffset())
1134 self.kind = self.SmiField(self.KindOffset()) 1134 self.kind = self.SmiField(self.KindOffset())
1135 1135
1136 def Print(self, p): 1136 def Print(self, p):
1137 p.Print(str(self)) 1137 p.Print(str(self))
1138 1138
1139 def __str__(self): 1139 def __str__(self):
1140 if self.to_string: 1140 if self.to_string:
1141 return "Oddball(%08x, <%s>)" % (self.address, self.to_string.GetChars()) 1141 return "Oddball(%08x, <%s>)" % (self.address, str(self.to_string))
1142 else: 1142 else:
1143 kind = "???" 1143 kind = "???"
1144 if 0 <= self.kind < len(Oddball.KINDS): 1144 if 0 <= self.kind < len(Oddball.KINDS):
1145 kind = Oddball.KINDS[self.kind] 1145 kind = Oddball.KINDS[self.kind]
1146 return "Oddball(%08x, kind=%s)" % (self.address, kind) 1146 return "Oddball(%08x, kind=%s)" % (self.address, kind)
1147 1147
1148 1148
1149 class FixedArray(HeapObject): 1149 class FixedArray(HeapObject):
1150 def LengthOffset(self): 1150 def LengthOffset(self):
1151 return self.heap.PointerSize() 1151 return self.heap.PointerSize()
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1994 options, args = parser.parse_args() 1994 options, args = parser.parse_args()
1995 if os.path.exists(options.objdump): 1995 if os.path.exists(options.objdump):
1996 disasm.OBJDUMP_BIN = options.objdump 1996 disasm.OBJDUMP_BIN = options.objdump
1997 OBJDUMP_BIN = options.objdump 1997 OBJDUMP_BIN = options.objdump
1998 else: 1998 else:
1999 print "Cannot find %s, falling back to default objdump" % options.objdump 1999 print "Cannot find %s, falling back to default objdump" % options.objdump
2000 if len(args) != 1: 2000 if len(args) != 1:
2001 parser.print_help() 2001 parser.print_help()
2002 sys.exit(1) 2002 sys.exit(1)
2003 AnalyzeMinidump(options, args[0]) 2003 AnalyzeMinidump(options, args[0])
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698