| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_DEBUG_H_ | 5 #ifndef V8_DEBUG_H_ |
| 6 #define V8_DEBUG_H_ | 6 #define V8_DEBUG_H_ |
| 7 | 7 |
| 8 #include "allocation.h" | 8 #include "allocation.h" |
| 9 #include "arguments.h" | 9 #include "arguments.h" |
| 10 #include "assembler.h" | 10 #include "assembler.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 // Support for setting the address to jump to when returning from break point. | 344 // Support for setting the address to jump to when returning from break point. |
| 345 Address* after_break_target_address() { | 345 Address* after_break_target_address() { |
| 346 return reinterpret_cast<Address*>(&thread_local_.after_break_target_); | 346 return reinterpret_cast<Address*>(&thread_local_.after_break_target_); |
| 347 } | 347 } |
| 348 Address* restarter_frame_function_pointer_address() { | 348 Address* restarter_frame_function_pointer_address() { |
| 349 Object*** address = &thread_local_.restarter_frame_function_pointer_; | 349 Object*** address = &thread_local_.restarter_frame_function_pointer_; |
| 350 return reinterpret_cast<Address*>(address); | 350 return reinterpret_cast<Address*>(address); |
| 351 } | 351 } |
| 352 | 352 |
| 353 // Support for saving/restoring registers when handling debug break calls. | |
| 354 Object** register_address(int r) { | |
| 355 return ®isters_[r]; | |
| 356 } | |
| 357 | |
| 358 static const int kEstimatedNofDebugInfoEntries = 16; | 353 static const int kEstimatedNofDebugInfoEntries = 16; |
| 359 static const int kEstimatedNofBreakPointsInFunction = 16; | 354 static const int kEstimatedNofBreakPointsInFunction = 16; |
| 360 | 355 |
| 361 // Passed to MakeWeak. | 356 // Passed to MakeWeak. |
| 362 static void HandleWeakDebugInfo( | 357 static void HandleWeakDebugInfo( |
| 363 const v8::WeakCallbackData<v8::Value, void>& data); | 358 const v8::WeakCallbackData<v8::Value, void>& data); |
| 364 | 359 |
| 365 friend class Debugger; | 360 friend class Debugger; |
| 366 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc | 361 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc |
| 367 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc | 362 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 // Pending interrupts scheduled while debugging. | 574 // Pending interrupts scheduled while debugging. |
| 580 bool has_pending_interrupt_; | 575 bool has_pending_interrupt_; |
| 581 | 576 |
| 582 // When restarter frame is on stack, stores the address | 577 // When restarter frame is on stack, stores the address |
| 583 // of the pointer to function being restarted. Otherwise (most of the time) | 578 // of the pointer to function being restarted. Otherwise (most of the time) |
| 584 // stores NULL. This pointer is used with 'step in' implementation. | 579 // stores NULL. This pointer is used with 'step in' implementation. |
| 585 Object** restarter_frame_function_pointer_; | 580 Object** restarter_frame_function_pointer_; |
| 586 }; | 581 }; |
| 587 | 582 |
| 588 // Storage location for registers when handling debug break calls | 583 // Storage location for registers when handling debug break calls |
| 589 JSCallerSavedBuffer registers_; | |
| 590 ThreadLocal thread_local_; | 584 ThreadLocal thread_local_; |
| 591 void ThreadInit(); | 585 void ThreadInit(); |
| 592 | 586 |
| 593 Isolate* isolate_; | 587 Isolate* isolate_; |
| 594 | 588 |
| 595 friend class Isolate; | 589 friend class Isolate; |
| 596 | 590 |
| 597 DISALLOW_COPY_AND_ASSIGN(Debug); | 591 DISALLOW_COPY_AND_ASSIGN(Debug); |
| 598 }; | 592 }; |
| 599 | 593 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 } | 941 } |
| 948 } | 942 } |
| 949 | 943 |
| 950 private: | 944 private: |
| 951 Debug::AddressId id_; | 945 Debug::AddressId id_; |
| 952 }; | 946 }; |
| 953 | 947 |
| 954 } } // namespace v8::internal | 948 } } // namespace v8::internal |
| 955 | 949 |
| 956 #endif // V8_DEBUG_H_ | 950 #endif // V8_DEBUG_H_ |
| OLD | NEW |