Commit 265c3629 authored by peter.rybin@gmail.com's avatar peter.rybin@gmail.com

Support LiveEdit when standing on return operator

Review URL: http://codereview.chromium.org/6894014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e013d4f0
...@@ -989,6 +989,11 @@ Object* Debug::Break(Arguments args) { ...@@ -989,6 +989,11 @@ Object* Debug::Break(Arguments args) {
} else if (thread_local_.frame_drop_mode_ == } else if (thread_local_.frame_drop_mode_ ==
FRAME_DROPPED_IN_DIRECT_CALL) { FRAME_DROPPED_IN_DIRECT_CALL) {
// Nothing to do, after_break_target is not used here. // 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 { } else {
UNREACHABLE(); UNREACHABLE();
} }
......
...@@ -422,7 +422,8 @@ class Debug { ...@@ -422,7 +422,8 @@ class Debug {
FRAME_DROPPED_IN_DEBUG_SLOT_CALL, FRAME_DROPPED_IN_DEBUG_SLOT_CALL,
// The top JS frame had been calling some C++ function. The return address // The top JS frame had been calling some C++ function. The return address
// gets patched automatically. // 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, void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
......
...@@ -1411,6 +1411,9 @@ static const char* DropFrames(Vector<StackFrame*> frames, ...@@ -1411,6 +1411,9 @@ static const char* DropFrames(Vector<StackFrame*> frames,
Builtins::kFrameDropper_LiveEdit)) { Builtins::kFrameDropper_LiveEdit)) {
// OK, we can drop our own code. // OK, we can drop our own code.
*mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; *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 && } else if (pre_top_frame_code->kind() == Code::STUB &&
pre_top_frame_code->major_key()) { pre_top_frame_code->major_key()) {
// Entry from our unit tests, it's fine, we support this case. // Entry from our unit tests, it's fine, we support this case.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment