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

Side by Side Diff: test/cctest/wasm/test-wasm-breakpoints.cc

Issue 2650943011: [debug] remove StepFrame (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-interface.h" 5 #include "src/debug/debug-interface.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/property-descriptor.h" 7 #include "src/property-descriptor.h"
8 #include "src/utils.h" 8 #include "src/utils.h"
9 #include "src/wasm/wasm-macro-gen.h" 9 #include "src/wasm/wasm-macro-gen.h"
10 #include "src/wasm/wasm-objects.h" 10 #include "src/wasm/wasm-objects.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 compiled_module->GetPossibleBreakpoints(start, end, &locations); 52 compiled_module->GetPossibleBreakpoints(start, end, &locations);
53 CHECK(!success); 53 CHECK(!success);
54 } 54 }
55 55
56 class BreakHandler { 56 class BreakHandler {
57 public: 57 public:
58 enum Action { 58 enum Action {
59 Continue = StepAction::LastStepAction + 1, 59 Continue = StepAction::LastStepAction + 1,
60 StepNext = StepAction::StepNext, 60 StepNext = StepAction::StepNext,
61 StepIn = StepAction::StepIn, 61 StepIn = StepAction::StepIn,
62 StepOut = StepAction::StepOut, 62 StepOut = StepAction::StepOut
63 StepFrame = StepAction::StepFrame
64 }; 63 };
65 struct BreakPoint { 64 struct BreakPoint {
66 int position; 65 int position;
67 Action action; 66 Action action;
68 BreakPoint(int position, Action action) 67 BreakPoint(int position, Action action)
69 : position(position), action(action) {} 68 : position(position), action(action) {}
70 }; 69 };
71 70
72 explicit BreakHandler(Isolate* isolate, 71 explicit BreakHandler(Isolate* isolate,
73 std::initializer_list<BreakPoint> expected_breaks) 72 std::initializer_list<BreakPoint> expected_breaks)
(...skipping 30 matching lines...) Expand all
104 auto summ = FrameSummary::GetTop(frame_it.frame()).AsWasmInterpreted(); 103 auto summ = FrameSummary::GetTop(frame_it.frame()).AsWasmInterpreted();
105 CHECK_EQ(expected_breaks_[count_].position, summ.byte_offset()); 104 CHECK_EQ(expected_breaks_[count_].position, summ.byte_offset());
106 105
107 Action next_action = expected_breaks_[count_].action; 106 Action next_action = expected_breaks_[count_].action;
108 switch (next_action) { 107 switch (next_action) {
109 case Continue: 108 case Continue:
110 break; 109 break;
111 case StepNext: 110 case StepNext:
112 case StepIn: 111 case StepIn:
113 case StepOut: 112 case StepOut:
114 case StepFrame:
115 isolate_->debug()->PrepareStep(static_cast<StepAction>(next_action)); 113 isolate_->debug()->PrepareStep(static_cast<StepAction>(next_action));
116 break; 114 break;
117 default: 115 default:
118 UNREACHABLE(); 116 UNREACHABLE();
119 } 117 }
120 ++count_; 118 ++count_;
121 } 119 }
122 120
123 static void DebugEventListener(const v8::Debug::EventDetails& event_details) { 121 static void DebugEventListener(const v8::Debug::EventDetails& event_details) {
124 if (event_details.GetEvent() != v8::DebugEvent::Break) return; 122 if (event_details.GetEvent() != v8::DebugEvent::Break) return;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 {19, BreakHandler::StepIn}, // GetLocal 278 {19, BreakHandler::StepIn}, // GetLocal
281 {21, BreakHandler::StepIn}, // Call 279 {21, BreakHandler::StepIn}, // Call
282 {1, BreakHandler::StepOut}, // in f2 280 {1, BreakHandler::StepOut}, // in f2
283 {23, BreakHandler::Continue} // After Call 281 {23, BreakHandler::Continue} // After Call
284 }); 282 });
285 283
286 Handle<Object> global(isolate->context()->global_object(), isolate); 284 Handle<Object> global(isolate->context()->global_object(), isolate);
287 CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 0, nullptr) 285 CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 0, nullptr)
288 .is_null()); 286 .is_null());
289 } 287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698