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

Side by Side Diff: runtime/bin/dbg_message.cc

Issue 993613002: Implement 'print', 'up', 'down', and 'frame' commands in the Observatory debugger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/vmservice/server.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "bin/dbg_connection.h" 5 #include "bin/dbg_connection.h"
6 #include "bin/dbg_message.h" 6 #include "bin/dbg_message.h"
7 #include "bin/dartutils.h" 7 #include "bin/dartutils.h"
8 #include "bin/lockers.h" 8 #include "bin/lockers.h"
9 #include "bin/thread.h" 9 #include "bin/thread.h"
10 #include "bin/utils.h" 10 #include "bin/utils.h"
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 is_running_ = false; 1090 is_running_ = false;
1091 1091
1092 // Request notification on isolate messages. This allows us to 1092 // Request notification on isolate messages. This allows us to
1093 // respond to vm service messages while at breakpoint. 1093 // respond to vm service messages while at breakpoint.
1094 Dart_SetMessageNotifyCallback(DbgMsgQueueList::NotifyIsolate); 1094 Dart_SetMessageNotifyCallback(DbgMsgQueueList::NotifyIsolate);
1095 1095
1096 while (true) { 1096 while (true) {
1097 // Handle all available vm service messages, up to a resume 1097 // Handle all available vm service messages, up to a resume
1098 // request. 1098 // request.
1099 bool resume = false; 1099 bool resume = false;
1100
1101 // Release the message queue lock before handling service
1102 // messages. This allows notifications to come in while we are
1103 // processing long requests and avoids deadlock with the PortMap
1104 // lock in the vm.
1105 msg_queue_lock_.Exit();
1100 while (!resume && Dart_HasServiceMessages()) { 1106 while (!resume && Dart_HasServiceMessages()) {
1101 // Release the message queue lock before handling service
1102 // messages. This allows notifications to come in while we are
1103 // processing long requests and avoids deadlock with the PortMap
1104 // lock in the vm.
1105 msg_queue_lock_.Exit();
1106 resume = Dart_HandleServiceMessages(); 1107 resume = Dart_HandleServiceMessages();
1107 msg_queue_lock_.Enter();
1108 } 1108 }
1109 msg_queue_lock_.Enter();
1110
1109 if (resume) { 1111 if (resume) {
1110 break; 1112 break;
1111 } 1113 }
1112 1114
1113 // Handle all available debug messages, up to a resume request. 1115 // Handle all available debug messages, up to a resume request.
1114 if (HandlePendingMessages()) { 1116 if (HandlePendingMessages()) {
1115 break; 1117 break;
1116 } 1118 }
1117 1119
1118 // Wait for more debug or vm service messages. 1120 // Wait for more debug or vm service messages.
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 } else { 1423 } else {
1422 ASSERT(kind == kShutdown); 1424 ASSERT(kind == kShutdown);
1423 RemoveIsolateMsgQueue(isolate_id); 1425 RemoveIsolateMsgQueue(isolate_id);
1424 } 1426 }
1425 } 1427 }
1426 Dart_ExitScope(); 1428 Dart_ExitScope();
1427 } 1429 }
1428 1430
1429 } // namespace bin 1431 } // namespace bin
1430 } // namespace dart 1432 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/vmservice/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698