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

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

Issue 11926026: Add function for one-time stop at function entry (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/include/dart_debugger_api.h » ('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 <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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698