Revision: 7468
Author:   [email protected]
Date:     Fri Apr  1 03:30:09 2011
Log:      Fix pc offset calculation for stack traces

Use the correct address of the code object to calculate the offset from the code object start to a pc for an optimized frame.

BUG=
TEST=

Review URL: http://codereview.chromium.org//6759052
http://code.google.com/p/v8/source/detail?r=7468

Modified:
 /branches/bleeding_edge/src/frames.h

=======================================
--- /branches/bleeding_edge/src/frames.h        Fri Mar 18 13:35:07 2011
+++ /branches/bleeding_edge/src/frames.h        Fri Apr  1 03:30:09 2011
@@ -430,7 +430,7 @@
   Handle<Object> receiver() { return receiver_; }
   Handle<JSFunction> function() { return function_; }
   Handle<Code> code() { return code_; }
-  Address pc() { return reinterpret_cast<Address>(*code_) + offset_; }
+  Address pc() { return code_->address() + offset_; }
   int offset() { return offset_; }
   bool is_constructor() { return is_constructor_; }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to