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

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 1282993002: Don't use %p when generating disassembly in vm service. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Pp Created 5 years, 4 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 | « no previous file | runtime/observatory/tests/service/service.status » ('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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of service; 5 part of service;
6 6
7 /// Helper function for canceling a Future<StreamSubscription>. 7 /// Helper function for canceling a Future<StreamSubscription>.
8 Future cancelFutureSubscription( 8 Future cancelFutureSubscription(
9 Future<StreamSubscription> subscriptionFuture) async { 9 Future<StreamSubscription> subscriptionFuture) async {
10 if (subscriptionFuture != null) { 10 if (subscriptionFuture != null) {
(...skipping 3339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3350 instructionsByAddressOffset = new List(endAddress - startAddress); 3350 instructionsByAddressOffset = new List(endAddress - startAddress);
3351 3351
3352 assert((disassembly.length % 3) == 0); 3352 assert((disassembly.length % 3) == 0);
3353 for (var i = 0; i < disassembly.length; i += 3) { 3353 for (var i = 0; i < disassembly.length; i += 3) {
3354 var address = 0; // Assume code comment. 3354 var address = 0; // Assume code comment.
3355 var machine = disassembly[i + 1]; 3355 var machine = disassembly[i + 1];
3356 var human = disassembly[i + 2]; 3356 var human = disassembly[i + 2];
3357 var pcOffset = 0; 3357 var pcOffset = 0;
3358 if (disassembly[i] != '') { 3358 if (disassembly[i] != '') {
3359 // Not a code comment, extract address. 3359 // Not a code comment, extract address.
3360 address = int.parse(disassembly[i]); 3360 address = int.parse(disassembly[i], radix:16);
3361 pcOffset = address - startAddress; 3361 pcOffset = address - startAddress;
3362 } 3362 }
3363 var instruction = new CodeInstruction(address, pcOffset, machine, human); 3363 var instruction = new CodeInstruction(address, pcOffset, machine, human);
3364 instructions.add(instruction); 3364 instructions.add(instruction);
3365 if (disassembly[i] != '') { 3365 if (disassembly[i] != '') {
3366 // Not a code comment. 3366 // Not a code comment.
3367 instructionsByAddressOffset[pcOffset] = instruction; 3367 instructionsByAddressOffset[pcOffset] = instruction;
3368 } 3368 }
3369 } 3369 }
3370 for (var instruction in instructions) { 3370 for (var instruction in instructions) {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3692 var v = list[i]; 3692 var v = list[i];
3693 if ((v is ObservableMap) && _isServiceMap(v)) { 3693 if ((v is ObservableMap) && _isServiceMap(v)) {
3694 list[i] = owner.getFromMap(v); 3694 list[i] = owner.getFromMap(v);
3695 } else if (v is ObservableList) { 3695 } else if (v is ObservableList) {
3696 _upgradeObservableList(v, owner); 3696 _upgradeObservableList(v, owner);
3697 } else if (v is ObservableMap) { 3697 } else if (v is ObservableMap) {
3698 _upgradeObservableMap(v, owner); 3698 _upgradeObservableMap(v, owner);
3699 } 3699 }
3700 } 3700 }
3701 } 3701 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698