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

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

Issue 2649533002: [wasm] Implement stepping in wasm code (Closed)
Patch Set: Add TODOs 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 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 (function (global, utils) { 5 (function (global, utils) {
6 "use strict"; 6 "use strict";
7 7
8 // ---------------------------------------------------------------------------- 8 // ----------------------------------------------------------------------------
9 // Imports 9 // Imports
10 10
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 } catch (e) { 1286 } catch (e) {
1287 // Failed in one of the catch blocks above - most generic error. 1287 // Failed in one of the catch blocks above - most generic error.
1288 return '{"seq":0,"type":"response","success":false,"message":"Internal error "}'; 1288 return '{"seq":0,"type":"response","success":false,"message":"Internal error "}';
1289 } 1289 }
1290 }; 1290 };
1291 1291
1292 1292
1293 DebugCommandProcessor.prototype.continueRequest_ = function(request, response) { 1293 DebugCommandProcessor.prototype.continueRequest_ = function(request, response) {
1294 // Check for arguments for continue. 1294 // Check for arguments for continue.
1295 if (request.arguments) { 1295 if (request.arguments) {
1296 var action = Debug.StepAction.StepIn;
1297
1298 // Pull out arguments. 1296 // Pull out arguments.
1299 var stepaction = request.arguments.stepaction; 1297 var stepaction = request.arguments.stepaction;
1300 1298
1301 // Get the stepaction argument. 1299 // Get the stepaction argument.
1302 if (stepaction) { 1300 if (stepaction) {
titzer 2017/01/23 10:10:10 This can probably be further simplified to just be
Clemens Hammacher 2017/01/23 12:25:34 Yang just removed this whole code anyway :)
1301 var action;
1303 if (stepaction == 'in') { 1302 if (stepaction == 'in') {
1304 action = Debug.StepAction.StepIn; 1303 action = Debug.StepAction.StepIn;
1305 } else if (stepaction == 'next') { 1304 } else if (stepaction == 'next') {
1306 action = Debug.StepAction.StepNext; 1305 action = Debug.StepAction.StepNext;
1307 } else if (stepaction == 'out') { 1306 } else if (stepaction == 'out') {
1308 action = Debug.StepAction.StepOut; 1307 action = Debug.StepAction.StepOut;
1309 } else { 1308 } else {
1310 throw %make_error(kDebugger, 1309 throw %make_error(kDebugger,
1311 'Invalid stepaction argument "' + stepaction + '".'); 1310 'Invalid stepaction argument "' + stepaction + '".');
1312 } 1311 }
1312
1313 // Set up the VM for stepping.
1314 this.exec_state_.prepareStep(action);
1313 } 1315 }
1314
1315 // Set up the VM for stepping.
1316 this.exec_state_.prepareStep(action);
1317 } 1316 }
1318 1317
1319 // VM should be running after executing this request. 1318 // VM should be running after executing this request.
1320 response.running = true; 1319 response.running = true;
1321 }; 1320 };
1322 1321
1323 1322
1324 DebugCommandProcessor.prototype.breakRequest_ = function(request, response) { 1323 DebugCommandProcessor.prototype.breakRequest_ = function(request, response) {
1325 // Ignore as break command does not do anything when broken. 1324 // Ignore as break command does not do anything when broken.
1326 }; 1325 };
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 utils.InstallFunctions(utils, DONT_ENUM, [ 2383 utils.InstallFunctions(utils, DONT_ENUM, [
2385 "MakeExecutionState", MakeExecutionState, 2384 "MakeExecutionState", MakeExecutionState,
2386 "MakeExceptionEvent", MakeExceptionEvent, 2385 "MakeExceptionEvent", MakeExceptionEvent,
2387 "MakeBreakEvent", MakeBreakEvent, 2386 "MakeBreakEvent", MakeBreakEvent,
2388 "MakeCompileEvent", MakeCompileEvent, 2387 "MakeCompileEvent", MakeCompileEvent,
2389 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, 2388 "MakeAsyncTaskEvent", MakeAsyncTaskEvent,
2390 "IsBreakPointTriggered", IsBreakPointTriggered, 2389 "IsBreakPointTriggered", IsBreakPointTriggered,
2391 ]); 2390 ]);
2392 2391
2393 }) 2392 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698