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

Side by Side Diff: runtime/vm/debugger.cc

Issue 1140263005: Revert "Hide Isolate pointer from embedder" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 unified diff | Download patch
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger_api_impl.cc » ('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 "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ServiceEvent service_event(event->isolate(), ServiceEvent::kResume); 256 ServiceEvent service_event(event->isolate(), ServiceEvent::kResume);
257 service_event.set_top_frame(event->top_frame()); 257 service_event.set_top_frame(event->top_frame());
258 Service::HandleEvent(&service_event); 258 Service::HandleEvent(&service_event);
259 } 259 }
260 } 260 }
261 261
262 262
263 void Debugger::SignalIsolateEvent(DebuggerEvent::EventType type) { 263 void Debugger::SignalIsolateEvent(DebuggerEvent::EventType type) {
264 if (HasEventHandler()) { 264 if (HasEventHandler()) {
265 DebuggerEvent event(isolate_, type); 265 DebuggerEvent event(isolate_, type);
266 ASSERT(event.isolate_id() != DART_ILLEGAL_ISOLATE_ID); 266 ASSERT(event.isolate_id() != ILLEGAL_ISOLATE_ID);
267 if (type == DebuggerEvent::kIsolateInterrupted) { 267 if (type == DebuggerEvent::kIsolateInterrupted) {
268 DebuggerStackTrace* trace = CollectStackTrace(); 268 DebuggerStackTrace* trace = CollectStackTrace();
269 ASSERT(trace->Length() > 0); 269 ASSERT(trace->Length() > 0);
270 event.set_top_frame(trace->FrameAt(0)); 270 event.set_top_frame(trace->FrameAt(0));
271 ASSERT(stack_trace_ == NULL); 271 ASSERT(stack_trace_ == NULL);
272 stack_trace_ = trace; 272 stack_trace_ = trace;
273 resume_action_ = kContinue; 273 resume_action_ = kContinue;
274 Pause(&event); 274 Pause(&event);
275 HandleSteppingRequest(trace); 275 HandleSteppingRequest(trace);
276 stack_trace_ = NULL; 276 stack_trace_ = NULL;
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 1032
1033 1033
1034 RawObject* RemoteObjectCache::GetObj(intptr_t obj_id) const { 1034 RawObject* RemoteObjectCache::GetObj(intptr_t obj_id) const {
1035 ASSERT(IsValidId(obj_id)); 1035 ASSERT(IsValidId(obj_id));
1036 return objs_->At(obj_id); 1036 return objs_->At(obj_id);
1037 } 1037 }
1038 1038
1039 1039
1040 Debugger::Debugger() 1040 Debugger::Debugger()
1041 : isolate_(NULL), 1041 : isolate_(NULL),
1042 isolate_id_(DART_ILLEGAL_ISOLATE_ID), 1042 isolate_id_(ILLEGAL_ISOLATE_ID),
1043 initialized_(false), 1043 initialized_(false),
1044 next_id_(1), 1044 next_id_(1),
1045 latent_breakpoints_(NULL), 1045 latent_breakpoints_(NULL),
1046 src_breakpoints_(NULL), 1046 src_breakpoints_(NULL),
1047 code_breakpoints_(NULL), 1047 code_breakpoints_(NULL),
1048 resume_action_(kContinue), 1048 resume_action_(kContinue),
1049 ignore_breakpoints_(false), 1049 ignore_breakpoints_(false),
1050 pause_event_(NULL), 1050 pause_event_(NULL),
1051 obj_cache_(NULL), 1051 obj_cache_(NULL),
1052 stack_trace_(NULL), 1052 stack_trace_(NULL),
1053 stepping_fp_(0), 1053 stepping_fp_(0),
1054 exc_pause_info_(kNoPauseOnExceptions) { 1054 exc_pause_info_(kNoPauseOnExceptions) {
1055 } 1055 }
1056 1056
1057 1057
1058 Debugger::~Debugger() { 1058 Debugger::~Debugger() {
1059 isolate_id_ = DART_ILLEGAL_ISOLATE_ID; 1059 isolate_id_ = ILLEGAL_ISOLATE_ID;
1060 ASSERT(!IsPaused()); 1060 ASSERT(!IsPaused());
1061 ASSERT(latent_breakpoints_ == NULL); 1061 ASSERT(latent_breakpoints_ == NULL);
1062 ASSERT(src_breakpoints_ == NULL); 1062 ASSERT(src_breakpoints_ == NULL);
1063 ASSERT(code_breakpoints_ == NULL); 1063 ASSERT(code_breakpoints_ == NULL);
1064 ASSERT(stack_trace_ == NULL); 1064 ASSERT(stack_trace_ == NULL);
1065 ASSERT(obj_cache_ == NULL); 1065 ASSERT(obj_cache_ == NULL);
1066 } 1066 }
1067 1067
1068 1068
1069 void Debugger::Shutdown() { 1069 void Debugger::Shutdown() {
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 } 2694 }
2695 2695
2696 2696
2697 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2697 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2698 ASSERT(bpt->next() == NULL); 2698 ASSERT(bpt->next() == NULL);
2699 bpt->set_next(code_breakpoints_); 2699 bpt->set_next(code_breakpoints_);
2700 code_breakpoints_ = bpt; 2700 code_breakpoints_ = bpt;
2701 } 2701 }
2702 2702
2703 } // namespace dart 2703 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698