| Index: src/debug.h
|
| diff --git a/src/debug.h b/src/debug.h
|
| index 948055dfe7f368ded3fc3b4fbeb940299fe84658..b6aba5aad1bf65ebffd6ec29bce0c7ea7254b640 100644
|
| --- a/src/debug.h
|
| +++ b/src/debug.h
|
| @@ -332,6 +332,7 @@ class Debug {
|
| k_after_break_target_address,
|
| k_debug_break_return_address,
|
| k_debug_break_slot_address,
|
| + k_restarter_frame_function_pointer,
|
| k_register_address
|
| };
|
|
|
| @@ -339,6 +340,10 @@ class Debug {
|
| static Address* after_break_target_address() {
|
| return reinterpret_cast<Address*>(&thread_local_.after_break_target_);
|
| }
|
| + static Address* restarter_frame_function_pointer_address() {
|
| + Object*** address = &thread_local_.restarter_frame_function_pointer_;
|
| + return reinterpret_cast<Address*>(address);
|
| + }
|
|
|
| // Support for saving/restoring registers when handling debug break calls.
|
| static Object** register_address(int r) {
|
| @@ -415,10 +420,22 @@ class Debug {
|
| };
|
|
|
| static void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
|
| - FrameDropMode mode);
|
| + FrameDropMode mode,
|
| + Object** restarter_frame_function_pointer);
|
| +
|
| + // Initializes an artificial stack frame. The data it contains is used for:
|
| + // a. successful work of frame dropper code which eventually gets control,
|
| + // b. being compatible with regular stack structure for various stack
|
| + // iterators.
|
| + // Returns address of stack allocated pointer to restarted function,
|
| + // the value that is called 'restarter_frame_function_pointer'. The value
|
| + // at this address (possibly updated by GC) may be used later when preparing
|
| + // 'step in' operation.
|
| + // The implementation is architecture-specific.
|
| + // TODO(LiveEdit): consider reviewing it as architecture-independent.
|
| + static Object** SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
|
| + Handle<Code> code);
|
|
|
| - static void SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
|
| - Handle<Code> code);
|
| static const int kFrameDropperFrameSize;
|
|
|
| private:
|
| @@ -495,6 +512,11 @@ class Debug {
|
|
|
| // Pending interrupts scheduled while debugging.
|
| int pending_interrupts_;
|
| +
|
| + // When restarter frame is on stack, stores the address
|
| + // of the pointer to function being restarted. Otherwise (most of the time)
|
| + // stores NULL. This pointer is used with 'step in' implementation.
|
| + Object** restarter_frame_function_pointer_;
|
| };
|
|
|
| // Storage location for registers when handling debug break calls
|
| @@ -938,6 +960,10 @@ class Debug_Address {
|
| return Debug_Address(Debug::k_debug_break_return_address);
|
| }
|
|
|
| + static Debug_Address RestarterFrameFunctionPointer() {
|
| + return Debug_Address(Debug::k_restarter_frame_function_pointer);
|
| + }
|
| +
|
| static Debug_Address Register(int reg) {
|
| return Debug_Address(Debug::k_register_address, reg);
|
| }
|
| @@ -950,6 +976,9 @@ class Debug_Address {
|
| return reinterpret_cast<Address>(Debug::debug_break_return_address());
|
| case Debug::k_debug_break_slot_address:
|
| return reinterpret_cast<Address>(Debug::debug_break_slot_address());
|
| + case Debug::k_restarter_frame_function_pointer:
|
| + return reinterpret_cast<Address>(
|
| + Debug::restarter_frame_function_pointer_address());
|
| case Debug::k_register_address:
|
| return reinterpret_cast<Address>(Debug::register_address(reg_));
|
| default:
|
|
|