| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/code_index_table.h" | 7 #include "vm/code_index_table.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 if (bp_handler_ == NULL) { | 286 if (bp_handler_ == NULL) { |
| 287 bp_handler_ = &DefaultBreakpointHandler; | 287 bp_handler_ = &DefaultBreakpointHandler; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 | 290 |
| 291 | 291 |
| 292 void Debugger::BreakpointCallback() { | 292 void Debugger::BreakpointCallback() { |
| 293 ASSERT(initialized_); | 293 ASSERT(initialized_); |
| 294 DartFrameIterator iterator; | 294 DartFrameIterator iterator; |
| 295 DartFrame* frame = iterator.NextFrame(); | 295 DartFrame* frame = iterator.NextFrame(); |
| 296 Function& func = Function::Handle(); | |
| 297 ASSERT(frame != NULL); | 296 ASSERT(frame != NULL); |
| 298 Breakpoint* bpt = GetBreakpoint(frame->pc()); | 297 Breakpoint* bpt = GetBreakpoint(frame->pc()); |
| 299 ASSERT(bpt != NULL); | 298 ASSERT(bpt != NULL); |
| 300 OS::Print(">>> Breakpoint at %s:%d (Address %p)\n", | 299 OS::Print(">>> Breakpoint at %s:%d (Address %p)\n", |
| 301 bpt ? String::Handle(bpt->SourceUrl()).ToCString() : "?", | 300 bpt ? String::Handle(bpt->SourceUrl()).ToCString() : "?", |
| 302 bpt ? bpt->LineNumber() : 0, | 301 bpt ? bpt->LineNumber() : 0, |
| 303 frame->pc()); | 302 frame->pc()); |
| 304 StackTrace* stack_trace = new StackTrace(8); | 303 StackTrace* stack_trace = new StackTrace(8); |
| 305 while (frame != NULL) { | 304 while (frame != NULL) { |
| 306 ASSERT(frame->IsValid()); | 305 ASSERT(frame->IsValid()); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 354 |
| 356 | 355 |
| 357 void Debugger::AddBreakpoint(Breakpoint* bpt) { | 356 void Debugger::AddBreakpoint(Breakpoint* bpt) { |
| 358 ASSERT(bpt->next() == NULL); | 357 ASSERT(bpt->next() == NULL); |
| 359 bpt->set_next(this->breakpoints_); | 358 bpt->set_next(this->breakpoints_); |
| 360 this->breakpoints_ = bpt; | 359 this->breakpoints_ = bpt; |
| 361 } | 360 } |
| 362 | 361 |
| 363 | 362 |
| 364 } // namespace dart | 363 } // namespace dart |
| OLD | NEW |