Reviewers: sgjesse,
Description:
Support LiveEdit when standing on return operator
Please review this at http://codereview.chromium.org/6894014/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/debug.h
M src/debug.cc
M src/liveedit.cc
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index
36913337e60e3437479f9f4f574ef4c7be7d1cce..6de237da3cfda83ca0b3e0ab800d7cd851883e22
100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -989,6 +989,11 @@ Object* Debug::Break(Arguments args) {
} else if (thread_local_.frame_drop_mode_ ==
FRAME_DROPPED_IN_DIRECT_CALL) {
// Nothing to do, after_break_target is not used here.
+ } else if (thread_local_.frame_drop_mode_ ==
+ FRAME_DROPPED_IN_RETURN_CALL) {
+ Code* plain_return = isolate_->builtins()->builtin(
+ Builtins::kFrameDropper_LiveEdit);
+ thread_local_.after_break_target_ = plain_return->entry();
} else {
UNREACHABLE();
}
Index: src/debug.h
diff --git a/src/debug.h b/src/debug.h
index
9366fc3012eeb2cd561bb334c7b5d1a3d03150d2..dbaabe9e1af5308b486ad6f515eb26a1cdaef636
100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -422,7 +422,8 @@ class Debug {
FRAME_DROPPED_IN_DEBUG_SLOT_CALL,
// The top JS frame had been calling some C++ function. The return
address
// gets patched automatically.
- FRAME_DROPPED_IN_DIRECT_CALL
+ FRAME_DROPPED_IN_DIRECT_CALL,
+ FRAME_DROPPED_IN_RETURN_CALL
};
void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index
14667660ad8088370ec3e7670879d1caae949c10..1098a55bb596e9debf864cd090fe9caace27ac61
100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -1411,6 +1411,9 @@ static const char* DropFrames(Vector<StackFrame*>
frames,
Builtins::kFrameDropper_LiveEdit)) {
// OK, we can drop our own code.
*mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL;
+ } else if (pre_top_frame_code ==
+ isolate->builtins()->builtin(Builtins::kReturn_DebugBreak)) {
+ *mode = Debug::FRAME_DROPPED_IN_RETURN_CALL;
} else if (pre_top_frame_code->kind() == Code::STUB &&
pre_top_frame_code->major_key()) {
// Entry from our unit tests, it's fine, we support this case.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev