OLD | NEW |
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 // Default number of frames to include in the response to backtrace request. | 5 // Default number of frames to include in the response to backtrace request. |
6 var kDefaultBacktraceLength = 10; | 6 var kDefaultBacktraceLength = 10; |
7 | 7 |
8 var Debug = {}; | 8 var Debug = {}; |
9 | 9 |
10 // Regular expression to skip "crud" at the beginning of a source line which is | 10 // Regular expression to skip "crud" at the beginning of a source line which is |
(...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 DebugCommandProcessor.prototype.isRunning = function() { | 2478 DebugCommandProcessor.prototype.isRunning = function() { |
2479 return this.running_; | 2479 return this.running_; |
2480 }; | 2480 }; |
2481 | 2481 |
2482 | 2482 |
2483 DebugCommandProcessor.prototype.systemBreak = function(cmd, args) { | 2483 DebugCommandProcessor.prototype.systemBreak = function(cmd, args) { |
2484 return %SystemBreak(); | 2484 return %SystemBreak(); |
2485 }; | 2485 }; |
2486 | 2486 |
2487 | 2487 |
2488 function NumberToHex8Str(n) { | |
2489 var r = ""; | |
2490 for (var i = 0; i < 8; ++i) { | |
2491 var c = hexCharArray[n & 0x0F]; // hexCharArray is defined in uri.js | |
2492 r = c + r; | |
2493 n = n >>> 4; | |
2494 } | |
2495 return r; | |
2496 } | |
2497 | |
2498 | |
2499 /** | 2488 /** |
2500 * Convert an Object to its debugger protocol representation. The representation | 2489 * Convert an Object to its debugger protocol representation. The representation |
2501 * may be serilized to a JSON object using JSON.stringify(). | 2490 * may be serilized to a JSON object using JSON.stringify(). |
2502 * This implementation simply runs through all string property names, converts | 2491 * This implementation simply runs through all string property names, converts |
2503 * each property value to a protocol value and adds the property to the result | 2492 * each property value to a protocol value and adds the property to the result |
2504 * object. For type "object" the function will be called recursively. Note that | 2493 * object. For type "object" the function will be called recursively. Note that |
2505 * circular structures will cause infinite recursion. | 2494 * circular structures will cause infinite recursion. |
2506 * @param {Object} object The object to format as protocol object. | 2495 * @param {Object} object The object to format as protocol object. |
2507 * @param {MirrorSerializer} mirror_serializer The serializer to use if any | 2496 * @param {MirrorSerializer} mirror_serializer The serializer to use if any |
2508 * mirror objects are encountered. | 2497 * mirror objects are encountered. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 | 2562 |
2574 default: | 2563 default: |
2575 json = null; | 2564 json = null; |
2576 } | 2565 } |
2577 return json; | 2566 return json; |
2578 } | 2567 } |
2579 | 2568 |
2580 Debug.TestApi = { | 2569 Debug.TestApi = { |
2581 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ | 2570 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ |
2582 }; | 2571 }; |
OLD | NEW |