When dumping the stack, try to print contents as ASCII
This makes it easier to find strings that are on the stack for debugging BUG=none LOG=n R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/132503005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
943960dfd1
commit
d5980902be
@ -3103,15 +3103,18 @@ def AnalyzeMinidump(options, minidump_name):
|
||||
frame_pointer = reader.ExceptionFP()
|
||||
print "Annotated stack (from exception.esp to bottom):"
|
||||
for slot in xrange(stack_top, stack_bottom, reader.PointerSize()):
|
||||
ascii_content = [c if c >= '\x20' and c < '\x7f' else '.'
|
||||
for c in reader.ReadBytes(slot, reader.PointerSize())]
|
||||
maybe_address = reader.ReadUIntPtr(slot)
|
||||
heap_object = heap.FindObject(maybe_address)
|
||||
maybe_symbol = reader.FindSymbol(maybe_address)
|
||||
if slot == frame_pointer:
|
||||
maybe_symbol = "<---- frame pointer"
|
||||
frame_pointer = maybe_address
|
||||
print "%s: %s %s" % (reader.FormatIntPtr(slot),
|
||||
reader.FormatIntPtr(maybe_address),
|
||||
maybe_symbol or "")
|
||||
print "%s: %s %s %s" % (reader.FormatIntPtr(slot),
|
||||
reader.FormatIntPtr(maybe_address),
|
||||
"".join(ascii_content),
|
||||
maybe_symbol or "")
|
||||
if heap_object:
|
||||
heap_object.Print(Printer())
|
||||
print
|
||||
|
Loading…
Reference in New Issue
Block a user