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

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

Issue 2650943011: [debug] remove StepFrame (Closed)
Patch Set: Created 3 years, 11 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/assembler-inl.h" 5 #include "src/assembler-inl.h"
6 #include "src/assert-scope.h" 6 #include "src/assert-scope.h"
7 #include "src/compiler/wasm-compiler.h" 7 #include "src/compiler/wasm-compiler.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterReturn); 167 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterReturn);
168 return thread->Step(); 168 return thread->Step();
169 case StepNext: { 169 case StepNext: {
170 int stack_depth = thread->GetFrameCount(); 170 int stack_depth = thread->GetFrameCount();
171 if (stack_depth == last_step_stack_depth_) return thread->Step(); 171 if (stack_depth == last_step_stack_depth_) return thread->Step();
172 thread->AddBreakFlags(stack_depth > last_step_stack_depth_ 172 thread->AddBreakFlags(stack_depth > last_step_stack_depth_
173 ? WasmInterpreter::BreakFlag::AfterReturn 173 ? WasmInterpreter::BreakFlag::AfterReturn
174 : WasmInterpreter::BreakFlag::AfterCall); 174 : WasmInterpreter::BreakFlag::AfterCall);
175 return thread->Run(); 175 return thread->Run();
176 } 176 }
177 case StepFrame:
178 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterCall |
179 WasmInterpreter::BreakFlag::AfterReturn);
180 return thread->Run();
181 default: 177 default:
182 UNREACHABLE(); 178 UNREACHABLE();
183 return WasmInterpreter::STOPPED; 179 return WasmInterpreter::STOPPED;
184 } 180 }
185 } 181 }
186 182
187 Handle<WasmInstanceObject> GetInstanceObject() { 183 Handle<WasmInstanceObject> GetInstanceObject() {
188 StackTraceFrameIterator it(isolate_); 184 StackTraceFrameIterator it(isolate_);
189 WasmInterpreterEntryFrame* frame = 185 WasmInterpreterEntryFrame* frame =
190 WasmInterpreterEntryFrame::cast(it.frame()); 186 WasmInterpreterEntryFrame::cast(it.frame());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 case StepIn: 222 case StepIn:
227 hit_step = true; 223 hit_step = true;
228 break; 224 break;
229 case StepOut: 225 case StepOut:
230 hit_step = thread->GetFrameCount() < last_step_stack_depth_; 226 hit_step = thread->GetFrameCount() < last_step_stack_depth_;
231 break; 227 break;
232 case StepNext: { 228 case StepNext: {
233 hit_step = thread->GetFrameCount() == last_step_stack_depth_; 229 hit_step = thread->GetFrameCount() == last_step_stack_depth_;
234 break; 230 break;
235 } 231 }
236 case StepFrame:
237 hit_step = thread->GetFrameCount() != last_step_stack_depth_;
238 break;
239 default: 232 default:
240 UNREACHABLE(); 233 UNREACHABLE();
241 } 234 }
242 if (!hit_step) return; 235 if (!hit_step) return;
243 ClearStepping(); 236 ClearStepping();
244 isolate_->debug()->OnDebugBreak(isolate_->factory()->undefined_value()); 237 isolate_->debug()->OnDebugBreak(isolate_->factory()->undefined_value());
245 } 238 }
246 239
247 int GetTopPosition(Handle<WasmCompiledModule> compiled_module) { 240 int GetTopPosition(Handle<WasmCompiledModule> compiled_module) {
248 DCHECK_EQ(1, interpreter()->GetThreadCount()); 241 DCHECK_EQ(1, interpreter()->GetThreadCount());
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 420
428 std::vector<std::pair<uint32_t, int>> WasmDebugInfo::GetInterpretedStack( 421 std::vector<std::pair<uint32_t, int>> WasmDebugInfo::GetInterpretedStack(
429 Address frame_pointer) { 422 Address frame_pointer) {
430 return GetInterpreterHandle(this)->GetInterpretedStack(frame_pointer); 423 return GetInterpreterHandle(this)->GetInterpretedStack(frame_pointer);
431 } 424 }
432 425
433 std::unique_ptr<wasm::InterpretedFrame> WasmDebugInfo::GetInterpretedFrame( 426 std::unique_ptr<wasm::InterpretedFrame> WasmDebugInfo::GetInterpretedFrame(
434 Address frame_pointer, int idx) { 427 Address frame_pointer, int idx) {
435 return GetInterpreterHandle(this)->GetInterpretedFrame(frame_pointer, idx); 428 return GetInterpreterHandle(this)->GetInterpretedFrame(frame_pointer, idx);
436 } 429 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698