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

Unified Diff: tools/grokdump.py

Issue 132503005: When dumping the stack, try to print contents as ASCII (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grokdump.py
diff --git a/tools/grokdump.py b/tools/grokdump.py
index 8178b2f0cfef2c032208002d2ebd74eb48c587d5..f6c45fce4ba2ee336b4f941a1fe6152a923ad757 100755
--- a/tools/grokdump.py
+++ b/tools/grokdump.py
@@ -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
« 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