Reviewers: Jakob,
Message:
wdyt is that useful in general?
Description:
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
Please review this at https://codereview.chromium.org/132503005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+6, -3 lines):
M tools/grokdump.py
Index: tools/grokdump.py
diff --git a/tools/grokdump.py b/tools/grokdump.py
index
d09c042204cd6d8c6a1626c49737c392d11d6dbc..96bd119b57aa5d0a1135900e2262a8601af5109c
100755
--- a/tools/grokdump.py
+++ b/tools/grokdump.py
@@ -1963,15 +1963,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),
+ ascii_content,
+ maybe_symbol or "")
if heap_object:
heap_object.Print(Printer())
print
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.