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

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

Issue 2068603002: [debugger] simplify debug stepping. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix completion callback Created 4 years, 6 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/assembler.cc ('k') | src/debug/debug.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 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_DEBUG_H_ 5 #ifndef V8_DEBUG_DEBUG_H_
6 #define V8_DEBUG_DEBUG_H_ 6 #define V8_DEBUG_DEBUG_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 void ChangeBreakOnException(ExceptionBreakType type, bool enable); 455 void ChangeBreakOnException(ExceptionBreakType type, bool enable);
456 bool IsBreakOnException(ExceptionBreakType type); 456 bool IsBreakOnException(ExceptionBreakType type);
457 457
458 // Stepping handling. 458 // Stepping handling.
459 void PrepareStep(StepAction step_action); 459 void PrepareStep(StepAction step_action);
460 void PrepareStepIn(Handle<JSFunction> function); 460 void PrepareStepIn(Handle<JSFunction> function);
461 void PrepareStepInSuspendedGenerator(); 461 void PrepareStepInSuspendedGenerator();
462 void PrepareStepOnThrow(); 462 void PrepareStepOnThrow();
463 void ClearStepping(); 463 void ClearStepping();
464 void ClearStepOut(); 464 void ClearStepOut();
465 void EnableStepIn();
466 465
467 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); 466 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared);
468 467
469 void RecordAsyncFunction(Handle<JSGeneratorObject> generator_object); 468 void RecordAsyncFunction(Handle<JSGeneratorObject> generator_object);
470 469
471 // Returns whether the operation succeeded. Compilation can only be triggered 470 // Returns whether the operation succeeded. Compilation can only be triggered
472 // if a valid closure is passed as the second argument, otherwise the shared 471 // if a valid closure is passed as the second argument, otherwise the shared
473 // function needs to be compiled already. 472 // function needs to be compiled already.
474 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, 473 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared,
475 Handle<JSFunction> function); 474 Handle<JSFunction> function);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 538
540 // Support for embedding into generated code. 539 // Support for embedding into generated code.
541 Address is_active_address() { 540 Address is_active_address() {
542 return reinterpret_cast<Address>(&is_active_); 541 return reinterpret_cast<Address>(&is_active_);
543 } 542 }
544 543
545 Address after_break_target_address() { 544 Address after_break_target_address() {
546 return reinterpret_cast<Address>(&after_break_target_); 545 return reinterpret_cast<Address>(&after_break_target_);
547 } 546 }
548 547
549 Address step_in_enabled_address() { 548 Address last_step_action_address() {
550 return reinterpret_cast<Address>(&thread_local_.step_in_enabled_); 549 return reinterpret_cast<Address>(&thread_local_.last_step_action_);
551 } 550 }
552 551
553 Address suspended_generator_address() { 552 Address suspended_generator_address() {
554 return reinterpret_cast<Address>(&thread_local_.suspended_generator_); 553 return reinterpret_cast<Address>(&thread_local_.suspended_generator_);
555 } 554 }
556 555
557 StepAction last_step_action() { return thread_local_.last_step_action_; } 556 StepAction last_step_action() { return thread_local_.last_step_action_; }
558 557
559 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; } 558 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; }
560 559
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 685
687 // Source statement position from last step next action. 686 // Source statement position from last step next action.
688 int last_statement_position_; 687 int last_statement_position_;
689 688
690 // Frame pointer from last step next or step frame action. 689 // Frame pointer from last step next or step frame action.
691 Address last_fp_; 690 Address last_fp_;
692 691
693 // Frame pointer of the target frame we want to arrive at. 692 // Frame pointer of the target frame we want to arrive at.
694 Address target_fp_; 693 Address target_fp_;
695 694
696 // Whether functions are flooded on entry for step-in and step-frame.
697 // If we stepped out to the embedder, disable flooding to spill stepping
698 // to the next call that the embedder makes.
699 bool step_in_enabled_;
700
701 // Stores the way how LiveEdit has patched the stack. It is used when 695 // Stores the way how LiveEdit has patched the stack. It is used when
702 // debugger returns control back to user script. 696 // debugger returns control back to user script.
703 LiveEdit::FrameDropMode frame_drop_mode_; 697 LiveEdit::FrameDropMode frame_drop_mode_;
704 698
705 // Value of accumulator in interpreter frames. In non-interpreter frames 699 // Value of accumulator in interpreter frames. In non-interpreter frames
706 // this value will be the hole. 700 // this value will be the hole.
707 Handle<Object> return_value_; 701 Handle<Object> return_value_;
708 702
709 Object* suspended_generator_; 703 Object* suspended_generator_;
710 }; 704 };
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 Handle<Code> code); 811 Handle<Code> code);
818 static bool DebugBreakSlotIsPatched(Address pc); 812 static bool DebugBreakSlotIsPatched(Address pc);
819 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); 813 static void ClearDebugBreakSlot(Isolate* isolate, Address pc);
820 }; 814 };
821 815
822 816
823 } // namespace internal 817 } // namespace internal
824 } // namespace v8 818 } // namespace v8
825 819
826 #endif // V8_DEBUG_DEBUG_H_ 820 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698