Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1143)

Side by Side Diff: src/debug.cc

Issue 115262: Change the handling of the debug break stack guard (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/debug.h ('k') | src/execution.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 thread_local_.break_count_ = 0; 436 thread_local_.break_count_ = 0;
437 thread_local_.break_id_ = 0; 437 thread_local_.break_id_ = 0;
438 thread_local_.break_frame_id_ = StackFrame::NO_ID; 438 thread_local_.break_frame_id_ = StackFrame::NO_ID;
439 thread_local_.last_step_action_ = StepNone; 439 thread_local_.last_step_action_ = StepNone;
440 thread_local_.last_statement_position_ = RelocInfo::kNoPosition; 440 thread_local_.last_statement_position_ = RelocInfo::kNoPosition;
441 thread_local_.step_count_ = 0; 441 thread_local_.step_count_ = 0;
442 thread_local_.last_fp_ = 0; 442 thread_local_.last_fp_ = 0;
443 thread_local_.step_into_fp_ = 0; 443 thread_local_.step_into_fp_ = 0;
444 thread_local_.after_break_target_ = 0; 444 thread_local_.after_break_target_ = 0;
445 thread_local_.debugger_entry_ = NULL; 445 thread_local_.debugger_entry_ = NULL;
446 thread_local_.preemption_pending_ = false; 446 thread_local_.pending_interrupts_ = 0;
447 } 447 }
448 448
449 449
450 JSCallerSavedBuffer Debug::registers_; 450 JSCallerSavedBuffer Debug::registers_;
451 Debug::ThreadLocal Debug::thread_local_; 451 Debug::ThreadLocal Debug::thread_local_;
452 452
453 453
454 char* Debug::ArchiveDebug(char* storage) { 454 char* Debug::ArchiveDebug(char* storage) {
455 char* to = storage; 455 char* to = storage;
456 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal)); 456 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal));
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 // Clear debugger context global handle. 721 // Clear debugger context global handle.
722 GlobalHandles::Destroy(reinterpret_cast<Object**>(debug_context_.location())); 722 GlobalHandles::Destroy(reinterpret_cast<Object**>(debug_context_.location()));
723 debug_context_ = Handle<Context>(); 723 debug_context_ = Handle<Context>();
724 } 724 }
725 725
726 726
727 // Set the flag indicating that preemption happened during debugging. 727 // Set the flag indicating that preemption happened during debugging.
728 void Debug::PreemptionWhileInDebugger() { 728 void Debug::PreemptionWhileInDebugger() {
729 ASSERT(InDebugger()); 729 ASSERT(InDebugger());
730 Debug::set_preemption_pending(true); 730 Debug::set_interrupts_pending(PREEMPT);
731 } 731 }
732 732
733 733
734 void Debug::Iterate(ObjectVisitor* v) { 734 void Debug::Iterate(ObjectVisitor* v) {
735 v->VisitPointer(bit_cast<Object**, Code**>(&(debug_break_return_entry_))); 735 v->VisitPointer(bit_cast<Object**, Code**>(&(debug_break_return_entry_)));
736 v->VisitPointer(bit_cast<Object**, Code**>(&(debug_break_return_))); 736 v->VisitPointer(bit_cast<Object**, Code**>(&(debug_break_return_)));
737 } 737 }
738 738
739 739
740 Object* Debug::Break(Arguments args) { 740 Object* Debug::Break(Arguments args) {
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 Handle<JSObject>::cast(event_data), 1920 Handle<JSObject>::cast(event_data),
1921 true); 1921 true);
1922 } 1922 }
1923 1923
1924 1924
1925 void Debugger::ProcessDebugEvent(v8::DebugEvent event, 1925 void Debugger::ProcessDebugEvent(v8::DebugEvent event,
1926 Handle<JSObject> event_data, 1926 Handle<JSObject> event_data,
1927 bool auto_continue) { 1927 bool auto_continue) {
1928 HandleScope scope; 1928 HandleScope scope;
1929 1929
1930 // Clear any pending debug break if this is a real break.
1931 if (!auto_continue) {
1932 Debug::clear_interrupt_pending(DEBUGBREAK);
1933 }
1934
1930 // Create the execution state. 1935 // Create the execution state.
1931 bool caught_exception = false; 1936 bool caught_exception = false;
1932 Handle<Object> exec_state = MakeExecutionState(&caught_exception); 1937 Handle<Object> exec_state = MakeExecutionState(&caught_exception);
1933 if (caught_exception) { 1938 if (caught_exception) {
1934 return; 1939 return;
1935 } 1940 }
1936 // First notify the message handler if any. 1941 // First notify the message handler if any.
1937 if (message_handler_ != NULL) { 1942 if (message_handler_ != NULL) {
1938 NotifyMessageHandler(event, 1943 NotifyMessageHandler(event,
1939 Handle<JSObject>::cast(exec_state), 1944 Handle<JSObject>::cast(exec_state),
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 2534
2530 2535
2531 void LockingCommandMessageQueue::Clear() { 2536 void LockingCommandMessageQueue::Clear() {
2532 ScopedLock sl(lock_); 2537 ScopedLock sl(lock_);
2533 queue_.Clear(); 2538 queue_.Clear();
2534 } 2539 }
2535 2540
2536 #endif // ENABLE_DEBUGGER_SUPPORT 2541 #endif // ENABLE_DEBUGGER_SUPPORT
2537 2542
2538 } } // namespace v8::internal 2543 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698