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

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

Issue 2642253005: [debugger api] remove legacy JSON debug protocol. (Closed)
Patch Set: fix cctest 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
« no previous file with comments | « src/log.cc ('k') | test/cctest/wasm/test-wasm-breakpoints.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 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // If we hit a breakpoint, pass a JSArray with all breakpoints, otherwise 171 // If we hit a breakpoint, pass a JSArray with all breakpoints, otherwise
172 // pass undefined. 172 // pass undefined.
173 Handle<Object> hit_breakpoints_js; 173 Handle<Object> hit_breakpoints_js;
174 if (hit_breakpoints.is_null()) { 174 if (hit_breakpoints.is_null()) {
175 hit_breakpoints_js = isolate_->factory()->undefined_value(); 175 hit_breakpoints_js = isolate_->factory()->undefined_value();
176 } else { 176 } else {
177 hit_breakpoints_js = isolate_->factory()->NewJSArrayWithElements( 177 hit_breakpoints_js = isolate_->factory()->NewJSArrayWithElements(
178 hit_breakpoints.ToHandleChecked()); 178 hit_breakpoints.ToHandleChecked());
179 } 179 }
180 180
181 isolate_->debug()->OnDebugBreak(hit_breakpoints_js, false); 181 isolate_->debug()->OnDebugBreak(hit_breakpoints_js);
182 } 182 }
183 183
184 int GetTopPosition(Handle<WasmCompiledModule> compiled_module) { 184 int GetTopPosition(Handle<WasmCompiledModule> compiled_module) {
185 DCHECK_EQ(1, interpreter()->GetThreadCount()); 185 DCHECK_EQ(1, interpreter()->GetThreadCount());
186 WasmInterpreter::Thread* thread = interpreter()->GetThread(0); 186 WasmInterpreter::Thread* thread = interpreter()->GetThread(0);
187 DCHECK_LT(0, thread->GetFrameCount()); 187 DCHECK_LT(0, thread->GetFrameCount());
188 188
189 wasm::InterpretedFrame frame = 189 wasm::InterpretedFrame frame =
190 thread->GetFrame(thread->GetFrameCount() - 1); 190 thread->GetFrame(thread->GetFrameCount() - 1);
191 return compiled_module->GetFunctionOffset(frame.function()->func_index) + 191 return compiled_module->GetFunctionOffset(frame.function()->func_index) +
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 std::vector<std::pair<uint32_t, int>> WasmDebugInfo::GetInterpretedStack( 361 std::vector<std::pair<uint32_t, int>> WasmDebugInfo::GetInterpretedStack(
362 Address frame_pointer) { 362 Address frame_pointer) {
363 return GetInterpreterHandle(this)->GetInterpretedStack(frame_pointer); 363 return GetInterpreterHandle(this)->GetInterpretedStack(frame_pointer);
364 } 364 }
365 365
366 std::unique_ptr<wasm::InterpretedFrame> WasmDebugInfo::GetInterpretedFrame( 366 std::unique_ptr<wasm::InterpretedFrame> WasmDebugInfo::GetInterpretedFrame(
367 Address frame_pointer, int idx) { 367 Address frame_pointer, int idx) {
368 return GetInterpreterHandle(this)->GetInterpretedFrame(frame_pointer, idx); 368 return GetInterpreterHandle(this)->GetInterpretedFrame(frame_pointer, idx);
369 } 369 }
OLDNEW
« no previous file with comments | « src/log.cc ('k') | test/cctest/wasm/test-wasm-breakpoints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698