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

Side by Side Diff: src/debug/debug.cc

Issue 1402913002: Debugger: fix stepping when break points are deactivated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test for stress test Created 5 years, 2 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
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug.js » ('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 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 #include "src/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 20 matching lines...) Expand all
31 : debug_context_(Handle<Context>()), 31 : debug_context_(Handle<Context>()),
32 event_listener_(Handle<Object>()), 32 event_listener_(Handle<Object>()),
33 event_listener_data_(Handle<Object>()), 33 event_listener_data_(Handle<Object>()),
34 message_handler_(NULL), 34 message_handler_(NULL),
35 command_received_(0), 35 command_received_(0),
36 command_queue_(isolate->logger(), kQueueInitialSize), 36 command_queue_(isolate->logger(), kQueueInitialSize),
37 is_active_(false), 37 is_active_(false),
38 is_suppressed_(false), 38 is_suppressed_(false),
39 live_edit_enabled_(true), // TODO(yangguo): set to false by default. 39 live_edit_enabled_(true), // TODO(yangguo): set to false by default.
40 break_disabled_(false), 40 break_disabled_(false),
41 break_points_active_(true),
41 in_debug_event_listener_(false), 42 in_debug_event_listener_(false),
42 break_on_exception_(false), 43 break_on_exception_(false),
43 break_on_uncaught_exception_(false), 44 break_on_uncaught_exception_(false),
44 debug_info_list_(NULL), 45 debug_info_list_(NULL),
45 isolate_(isolate) { 46 isolate_(isolate) {
46 ThreadInit(); 47 ThreadInit();
47 } 48 }
48 49
49 50
50 static v8::Local<v8::Context> GetDebugEventContext(Isolate* isolate) { 51 static v8::Local<v8::Context> GetDebugEventContext(Isolate* isolate) {
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 if (!StepNextContinue(&break_location, frame)) { 451 if (!StepNextContinue(&break_location, frame)) {
451 // Decrease steps left if performing multiple steps. 452 // Decrease steps left if performing multiple steps.
452 if (thread_local_.step_count_ > 0) { 453 if (thread_local_.step_count_ > 0) {
453 thread_local_.step_count_--; 454 thread_local_.step_count_--;
454 } 455 }
455 } 456 }
456 457
457 // If there is one or more real break points check whether any of these are 458 // If there is one or more real break points check whether any of these are
458 // triggered. 459 // triggered.
459 Handle<Object> break_points_hit(heap->undefined_value(), isolate_); 460 Handle<Object> break_points_hit(heap->undefined_value(), isolate_);
460 if (break_location.HasBreakPoint()) { 461 if (break_points_active_ && break_location.HasBreakPoint()) {
461 Handle<Object> break_point_objects = break_location.BreakPointObjects(); 462 Handle<Object> break_point_objects = break_location.BreakPointObjects();
462 break_points_hit = CheckBreakPoints(break_point_objects); 463 break_points_hit = CheckBreakPoints(break_point_objects);
463 } 464 }
464 465
465 // If step out is active skip everything until the frame where we need to step 466 // If step out is active skip everything until the frame where we need to step
466 // out to is reached, unless real breakpoint is hit. 467 // out to is reached, unless real breakpoint is hit.
467 if (StepOutActive() && 468 if (StepOutActive() &&
468 frame->fp() != thread_local_.step_out_fp_ && 469 frame->fp() != thread_local_.step_out_fp_ &&
469 break_points_hit->IsUndefined() ) { 470 break_points_hit->IsUndefined() ) {
470 // Step count should always be 0 for StepOut. 471 // Step count should always be 0 for StepOut.
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2579 } 2580 }
2580 2581
2581 2582
2582 void LockingCommandMessageQueue::Clear() { 2583 void LockingCommandMessageQueue::Clear() {
2583 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2584 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2584 queue_.Clear(); 2585 queue_.Clear();
2585 } 2586 }
2586 2587
2587 } // namespace internal 2588 } // namespace internal
2588 } // namespace v8 2589 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698