diff options
| author | Ben Murdoch <benm@google.com> | 2010-08-11 14:56:33 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-08-11 14:56:33 +0100 |
| commit | bb769b257e753aafcbd96767abb2abc645eaa20c (patch) | |
| tree | c6fa2c4c5dc62a17135d5e70ba1fd2117ad934e3 /src/debug.h | |
| parent | 91e42c979b0b259e6ffa5b3ebc410f47b2bb2cda (diff) | |
| download | android_external_v8-bb769b257e753aafcbd96767abb2abc645eaa20c.tar.gz android_external_v8-bb769b257e753aafcbd96767abb2abc645eaa20c.tar.bz2 android_external_v8-bb769b257e753aafcbd96767abb2abc645eaa20c.zip | |
Update V8 to r5214 as required by WebKit r65072.
Change-Id: I387277a00cc0949597c0f69a8e4f2da60213c8f2
Diffstat (limited to 'src/debug.h')
| -rw-r--r-- | src/debug.h | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/debug.h b/src/debug.h index 7bb4a428..b6aba5aa 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 @@ -906,8 +928,6 @@ class EnterDebugger BASE_EMBEDDED { // Stack allocated class for disabling break. class DisableBreak BASE_EMBEDDED { public: - // Enter the debugger by storing the previous top context and setting the - // current top context to the debugger context. explicit DisableBreak(bool disable_break) { prev_disable_break_ = Debug::disable_break(); Debug::set_disable_break(disable_break); @@ -940,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); } @@ -952,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: |
