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

Unified Diff: runtime/lib/debugger.cc

Issue 1116263004: Add 'dart:debugger' library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/debugger.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/debugger.cc
diff --git a/runtime/lib/debugger.cc b/runtime/lib/debugger.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b2a91b183aa5fcd298be99ab09d3d25772f9d099
--- /dev/null
+++ b/runtime/lib/debugger.cc
@@ -0,0 +1,42 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/bootstrap_natives.h"
+
+#include "include/dart_api.h"
+
+#include "vm/debugger.h"
+#include "vm/exceptions.h"
+#include "vm/native_entry.h"
+#include "vm/object.h"
+#include "vm/object_store.h"
+
+namespace dart {
+
+// dart:debugger.
+
+DEFINE_NATIVE_ENTRY(Debugger_breakHere, 0) {
+ Debugger* debugger = isolate->debugger();
+ if (!debugger) {
+ return Object::null();
+ }
+ debugger->BreakHere();
+ return Object::null();
+}
+
+
+DEFINE_NATIVE_ENTRY(Debugger_breakHereIf, 1) {
+ Debugger* debugger = isolate->debugger();
+ if (!debugger) {
+ return Object::null();
+ }
+ GET_NON_NULL_NATIVE_ARGUMENT(Bool, expr, arguments->NativeArgAt(0));
+ if (expr.value()) {
+ debugger->BreakHere();
+ }
+ return Object::null();
+}
+
+
+} // namespace dart
« no previous file with comments | « no previous file | runtime/lib/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698