| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // Support for setting the address to jump to when returning from break point. | 328 // Support for setting the address to jump to when returning from break point. |
| 329 static Address* after_break_target_address() { | 329 static Address* after_break_target_address() { |
| 330 return reinterpret_cast<Address*>(&thread_local_.after_break_target_); | 330 return reinterpret_cast<Address*>(&thread_local_.after_break_target_); |
| 331 } | 331 } |
| 332 | 332 |
| 333 // Support for saving/restoring registers when handling debug break calls. | 333 // Support for saving/restoring registers when handling debug break calls. |
| 334 static Object** register_address(int r) { | 334 static Object** register_address(int r) { |
| 335 return ®isters_[r]; | 335 return ®isters_[r]; |
| 336 } | 336 } |
| 337 | 337 |
| 338 // Address of the debug break return entry code. | 338 // Access to the debug break on return code. |
| 339 static Code* debug_break_return_entry() { return debug_break_return_entry_; } | 339 static Code* debug_break_return() { return debug_break_return_; } |
| 340 | |
| 341 // Support for getting the address of the debug break on return code. | |
| 342 static Code** debug_break_return_address() { | 340 static Code** debug_break_return_address() { |
| 343 return &debug_break_return_; | 341 return &debug_break_return_; |
| 344 } | 342 } |
| 345 | 343 |
| 346 static const int kEstimatedNofDebugInfoEntries = 16; | 344 static const int kEstimatedNofDebugInfoEntries = 16; |
| 347 static const int kEstimatedNofBreakPointsInFunction = 16; | 345 static const int kEstimatedNofBreakPointsInFunction = 16; |
| 348 | 346 |
| 349 static void HandleWeakDebugInfo(v8::Persistent<v8::Value> obj, void* data); | 347 static void HandleWeakDebugInfo(v8::Persistent<v8::Value> obj, void* data); |
| 350 | 348 |
| 351 friend class Debugger; | 349 friend class Debugger; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 378 static const int kX64CallInstructionLength = 13; | 376 static const int kX64CallInstructionLength = 13; |
| 379 static const int kX64JSReturnSequenceLength = 13; | 377 static const int kX64JSReturnSequenceLength = 13; |
| 380 | 378 |
| 381 // Code generator routines. | 379 // Code generator routines. |
| 382 static void GenerateLoadICDebugBreak(MacroAssembler* masm); | 380 static void GenerateLoadICDebugBreak(MacroAssembler* masm); |
| 383 static void GenerateStoreICDebugBreak(MacroAssembler* masm); | 381 static void GenerateStoreICDebugBreak(MacroAssembler* masm); |
| 384 static void GenerateKeyedLoadICDebugBreak(MacroAssembler* masm); | 382 static void GenerateKeyedLoadICDebugBreak(MacroAssembler* masm); |
| 385 static void GenerateKeyedStoreICDebugBreak(MacroAssembler* masm); | 383 static void GenerateKeyedStoreICDebugBreak(MacroAssembler* masm); |
| 386 static void GenerateConstructCallDebugBreak(MacroAssembler* masm); | 384 static void GenerateConstructCallDebugBreak(MacroAssembler* masm); |
| 387 static void GenerateReturnDebugBreak(MacroAssembler* masm); | 385 static void GenerateReturnDebugBreak(MacroAssembler* masm); |
| 388 static void GenerateReturnDebugBreakEntry(MacroAssembler* masm); | |
| 389 static void GenerateStubNoRegistersDebugBreak(MacroAssembler* masm); | 386 static void GenerateStubNoRegistersDebugBreak(MacroAssembler* masm); |
| 390 | 387 |
| 391 // Called from stub-cache.cc. | 388 // Called from stub-cache.cc. |
| 392 static void GenerateCallICDebugBreak(MacroAssembler* masm); | 389 static void GenerateCallICDebugBreak(MacroAssembler* masm); |
| 393 | 390 |
| 394 private: | 391 private: |
| 395 static bool CompileDebuggerScript(int index); | 392 static bool CompileDebuggerScript(int index); |
| 396 static void ClearOneShot(); | 393 static void ClearOneShot(); |
| 397 static void ActivateStepIn(StackFrame* frame); | 394 static void ActivateStepIn(StackFrame* frame); |
| 398 static void ClearStepIn(); | 395 static void ClearStepIn(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 459 |
| 463 // Pending interrupts scheduled while debugging. | 460 // Pending interrupts scheduled while debugging. |
| 464 int pending_interrupts_; | 461 int pending_interrupts_; |
| 465 }; | 462 }; |
| 466 | 463 |
| 467 // Storage location for registers when handling debug break calls | 464 // Storage location for registers when handling debug break calls |
| 468 static JSCallerSavedBuffer registers_; | 465 static JSCallerSavedBuffer registers_; |
| 469 static ThreadLocal thread_local_; | 466 static ThreadLocal thread_local_; |
| 470 static void ThreadInit(); | 467 static void ThreadInit(); |
| 471 | 468 |
| 472 // Code object for debug break return entry code. | |
| 473 static Code* debug_break_return_entry_; | |
| 474 | |
| 475 // Code to call for handling debug break on return. | 469 // Code to call for handling debug break on return. |
| 476 static Code* debug_break_return_; | 470 static Code* debug_break_return_; |
| 477 | 471 |
| 478 DISALLOW_COPY_AND_ASSIGN(Debug); | 472 DISALLOW_COPY_AND_ASSIGN(Debug); |
| 479 }; | 473 }; |
| 480 | 474 |
| 481 | 475 |
| 482 // Message delivered to the message handler callback. This is either a debugger | 476 // Message delivered to the message handler callback. This is either a debugger |
| 483 // event or the response to a command. | 477 // event or the response to a command. |
| 484 class MessageImpl: public v8::Debug::Message { | 478 class MessageImpl: public v8::Debug::Message { |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 Debug::AddressId id_; | 856 Debug::AddressId id_; |
| 863 int reg_; | 857 int reg_; |
| 864 }; | 858 }; |
| 865 | 859 |
| 866 | 860 |
| 867 } } // namespace v8::internal | 861 } } // namespace v8::internal |
| 868 | 862 |
| 869 #endif // ENABLE_DEBUGGER_SUPPORT | 863 #endif // ENABLE_DEBUGGER_SUPPORT |
| 870 | 864 |
| 871 #endif // V8_DEBUG_H_ | 865 #endif // V8_DEBUG_H_ |
| OLD | NEW |