| 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 char* dot = strchr(bpt_function, '.'); | 538 char* dot = strchr(bpt_function, '.'); |
| 539 if (dot == NULL) { | 539 if (dot == NULL) { |
| 540 class_name = DartUtils::NewString(""); | 540 class_name = DartUtils::NewString(""); |
| 541 function_name = DartUtils::NewString(breakpoint_at); | 541 function_name = DartUtils::NewString(breakpoint_at); |
| 542 } else { | 542 } else { |
| 543 *dot = '\0'; | 543 *dot = '\0'; |
| 544 class_name = DartUtils::NewString(bpt_function); | 544 class_name = DartUtils::NewString(bpt_function); |
| 545 function_name = DartUtils::NewString(dot + 1); | 545 function_name = DartUtils::NewString(dot + 1); |
| 546 } | 546 } |
| 547 free(bpt_function); | 547 free(bpt_function); |
| 548 Dart_Breakpoint bpt; | 548 result = Dart_OneTimeBreakAtEntry(library, class_name, function_name); |
| 549 result = Dart_SetBreakpointAtEntry( | |
| 550 library, class_name, function_name, &bpt); | |
| 551 } | 549 } |
| 552 return result; | 550 return result; |
| 553 } | 551 } |
| 554 | 552 |
| 555 | 553 |
| 556 char* BuildIsolateName(const char* script_name, | 554 char* BuildIsolateName(const char* script_name, |
| 557 const char* func_name) { | 555 const char* func_name) { |
| 558 // Skip past any slashes in the script name. | 556 // Skip past any slashes in the script name. |
| 559 const char* last_slash = strrchr(script_name, '/'); | 557 const char* last_slash = strrchr(script_name, '/'); |
| 560 if (last_slash != NULL) { | 558 if (last_slash != NULL) { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 Dart_ShutdownIsolate(); | 718 Dart_ShutdownIsolate(); |
| 721 // Terminate process exit-code handler. | 719 // Terminate process exit-code handler. |
| 722 Process::TerminateExitCodeHandler(); | 720 Process::TerminateExitCodeHandler(); |
| 723 // Free copied argument strings if converted. | 721 // Free copied argument strings if converted. |
| 724 if (argv_converted) { | 722 if (argv_converted) { |
| 725 for (int i = 0; i < argc; i++) free(argv[i]); | 723 for (int i = 0; i < argc; i++) free(argv[i]); |
| 726 } | 724 } |
| 727 | 725 |
| 728 return Process::GlobalExitCode(); | 726 return Process::GlobalExitCode(); |
| 729 } | 727 } |
| OLD | NEW |