| OLD | NEW |
| 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/thread.h" | 8 #include "bin/thread.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 | 10 |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 return; | 1153 return; |
| 1154 } | 1154 } |
| 1155 iterator = queue; | 1155 iterator = queue; |
| 1156 queue = queue->next(); | 1156 queue = queue->next(); |
| 1157 } | 1157 } |
| 1158 } | 1158 } |
| 1159 UNREACHABLE(); | 1159 UNREACHABLE(); |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 | 1162 |
| 1163 void DbgMsgQueueList::ListIsolateIds(dart::TextBuffer* msg) { |
| 1164 MutexLocker ml(&msg_queue_list_lock_); |
| 1165 if (list_ == NULL) { |
| 1166 return; // No items in the list. |
| 1167 } |
| 1168 DbgMsgQueue* queue = list_; |
| 1169 msg->Printf("%"Pd64"", queue->isolate_id()); |
| 1170 queue = queue->next(); |
| 1171 while (queue != NULL) { |
| 1172 msg->Printf(",%"Pd64"", queue->isolate_id()); |
| 1173 queue = queue->next(); |
| 1174 } |
| 1175 } |
| 1176 |
| 1177 |
| 1163 void DbgMsgQueueList::BptResolvedHandler(Dart_IsolateId isolate_id, | 1178 void DbgMsgQueueList::BptResolvedHandler(Dart_IsolateId isolate_id, |
| 1164 intptr_t bp_id, | 1179 intptr_t bp_id, |
| 1165 const Dart_CodeLocation& location) { | 1180 const Dart_CodeLocation& location) { |
| 1166 Dart_EnterScope(); | 1181 Dart_EnterScope(); |
| 1167 dart::TextBuffer msg(128); | 1182 dart::TextBuffer msg(128); |
| 1168 msg.Printf("{ \"event\": \"breakpointResolved\", \"params\": {"); | 1183 msg.Printf("{ \"event\": \"breakpointResolved\", \"params\": {"); |
| 1169 msg.Printf("\"breakpointId\": %"Pd"", bp_id); | 1184 msg.Printf("\"breakpointId\": %"Pd"", bp_id); |
| 1170 | 1185 |
| 1171 msg.Printf(", \"isolateId\":%"Pd64"", isolate_id); | 1186 msg.Printf(", \"isolateId\":%"Pd64"", isolate_id); |
| 1172 ASSERT(!Dart_IsNull(location.script_url)); | 1187 ASSERT(!Dart_IsNull(location.script_url)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 msg_queue->SendIsolateEvent(isolate_id, kind); | 1239 msg_queue->SendIsolateEvent(isolate_id, kind); |
| 1225 if (kind == kInterrupted) { | 1240 if (kind == kInterrupted) { |
| 1226 msg_queue->HandleMessages(); | 1241 msg_queue->HandleMessages(); |
| 1227 } else { | 1242 } else { |
| 1228 ASSERT(kind == kShutdown); | 1243 ASSERT(kind == kShutdown); |
| 1229 RemoveIsolateMsgQueue(isolate_id); | 1244 RemoveIsolateMsgQueue(isolate_id); |
| 1230 } | 1245 } |
| 1231 } | 1246 } |
| 1232 Dart_ExitScope(); | 1247 Dart_ExitScope(); |
| 1233 } | 1248 } |
| OLD | NEW |