| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_debugger_api.h" | 10 #include "include/dart_debugger_api.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 DEFAULT_VM_SERVICE_SERVER_IP)) { | 295 DEFAULT_VM_SERVICE_SERVER_IP)) { |
| 296 Log::PrintErr("unrecognized --enable-vm-service option syntax. " | 296 Log::PrintErr("unrecognized --enable-vm-service option syntax. " |
| 297 "Use --enable-vm-service[:<port number>[/<IPv4 address>]]\n"); | 297 "Use --enable-vm-service[:<port number>[/<IPv4 address>]]\n"); |
| 298 return false; | 298 return false; |
| 299 } | 299 } |
| 300 | 300 |
| 301 start_vm_service = true; | 301 start_vm_service = true; |
| 302 return true; | 302 return true; |
| 303 } | 303 } |
| 304 | 304 |
| 305 |
| 305 static bool ProcessObserveOption(const char* option_value, | 306 static bool ProcessObserveOption(const char* option_value, |
| 306 CommandLineOptions* vm_options) { | 307 CommandLineOptions* vm_options) { |
| 307 ASSERT(option_value != NULL); | 308 ASSERT(option_value != NULL); |
| 308 | 309 |
| 309 if (!ProcessEnableVmServiceOption(option_value, vm_options)) { | 310 if (!ExtractPortAndIP(option_value, |
| 311 &vm_service_server_port, |
| 312 &vm_service_server_ip, |
| 313 DEFAULT_VM_SERVICE_SERVER_PORT, |
| 314 DEFAULT_VM_SERVICE_SERVER_IP)) { |
| 315 Log::PrintErr("unrecognized --observe option syntax. " |
| 316 "Use --observe[:<port number>[/<IPv4 address>]]\n"); |
| 310 return false; | 317 return false; |
| 311 } | 318 } |
| 319 |
| 320 start_vm_service = true; |
| 321 |
| 312 vm_options->AddArgument("--pause-isolates-on-exit"); | 322 vm_options->AddArgument("--pause-isolates-on-exit"); |
| 313 return true; | 323 return true; |
| 314 } | 324 } |
| 315 | 325 |
| 316 | 326 |
| 317 bool trace_debug_protocol = false; | 327 bool trace_debug_protocol = false; |
| 318 static bool ProcessTraceDebugProtocolOption(const char* arg, | 328 static bool ProcessTraceDebugProtocolOption(const char* arg, |
| 319 CommandLineOptions* vm_options) { | 329 CommandLineOptions* vm_options) { |
| 320 if (*arg != '\0') { | 330 if (*arg != '\0') { |
| 321 return false; | 331 return false; |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 exit(Process::GlobalExitCode()); | 1166 exit(Process::GlobalExitCode()); |
| 1157 } | 1167 } |
| 1158 | 1168 |
| 1159 } // namespace bin | 1169 } // namespace bin |
| 1160 } // namespace dart | 1170 } // namespace dart |
| 1161 | 1171 |
| 1162 int main(int argc, char** argv) { | 1172 int main(int argc, char** argv) { |
| 1163 dart::bin::main(argc, argv); | 1173 dart::bin::main(argc, argv); |
| 1164 UNREACHABLE(); | 1174 UNREACHABLE(); |
| 1165 } | 1175 } |
| OLD | NEW |