Revision: 16090
Author:   [email protected]
Date:     Wed Aug  7 01:57:25 2013
Log:      Add frame pointer markup to grokdump.

[email protected]

Review URL: https://codereview.chromium.org/22556002
http://code.google.com/p/v8/source/detail?r=16090

Modified:
 /branches/bleeding_edge/tools/grokdump.py

=======================================
--- /branches/bleeding_edge/tools/grokdump.py   Fri Aug  2 02:02:02 2013
+++ /branches/bleeding_edge/tools/grokdump.py   Wed Aug  7 01:57:25 2013
@@ -760,6 +760,14 @@
     elif self.arch == MD_CPU_ARCHITECTURE_X86:
       return self.exception_context.esp

+  def ExceptionFP(self):
+    if self.arch == MD_CPU_ARCHITECTURE_AMD64:
+      return self.exception_context.rbp
+    elif self.arch == MD_CPU_ARCHITECTURE_ARM:
+      return None
+    elif self.arch == MD_CPU_ARCHITECTURE_X86:
+      return self.exception_context.ebp
+
   def FormatIntPtr(self, value):
     if self.arch == MD_CPU_ARCHITECTURE_AMD64:
       return "%016x" % value
@@ -1951,11 +1959,15 @@
       print "Kthxbye."
   elif not options.command:
     if reader.exception is not None:
+      frame_pointer = reader.ExceptionFP()
       print "Annotated stack (from exception.esp to bottom):"
       for slot in xrange(stack_top, stack_bottom, 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 "")

--
--
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/groups/opt_out.


Reply via email to