| 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_patcher.h" | 7 #include "vm/code_patcher.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 initialized_ = true; | 147 initialized_ = true; |
| 148 if (!FLAG_debugger) { | 148 if (!FLAG_debugger) { |
| 149 return; | 149 return; |
| 150 } | 150 } |
| 151 if (FLAG_bpt == NULL) { | 151 if (FLAG_bpt == NULL) { |
| 152 FLAG_bpt = "main"; | 152 FLAG_bpt = "main"; |
| 153 } | 153 } |
| 154 String& cname = String::Handle(); | 154 String& cname = String::Handle(); |
| 155 String& fname = String::Handle(); | 155 String& fname = String::Handle(); |
| 156 char* dot = strchr(FLAG_bpt, '.'); | 156 const char* dot = strchr(FLAG_bpt, '.'); |
| 157 if (dot == NULL) { | 157 if (dot == NULL) { |
| 158 fname = String::New(FLAG_bpt); | 158 fname = String::New(FLAG_bpt); |
| 159 } else { | 159 } else { |
| 160 fname = String::New(dot + 1); | 160 fname = String::New(dot + 1); |
| 161 cname = String::New(reinterpret_cast<const uint8_t*>(FLAG_bpt), | 161 cname = String::New(reinterpret_cast<const uint8_t*>(FLAG_bpt), |
| 162 dot - FLAG_bpt); | 162 dot - FLAG_bpt); |
| 163 } | 163 } |
| 164 SetBreakpointAtEntry(cname, fname); | 164 SetBreakpointAtEntry(cname, fname); |
| 165 } | 165 } |
| 166 | 166 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 178 | 178 |
| 179 | 179 |
| 180 void Debugger::AddBreakpoint(Breakpoint* bpt) { | 180 void Debugger::AddBreakpoint(Breakpoint* bpt) { |
| 181 ASSERT(bpt->next() == NULL); | 181 ASSERT(bpt->next() == NULL); |
| 182 bpt->set_next(this->breakpoints_); | 182 bpt->set_next(this->breakpoints_); |
| 183 this->breakpoints_ = bpt; | 183 this->breakpoints_ = bpt; |
| 184 } | 184 } |
| 185 | 185 |
| 186 | 186 |
| 187 } // namespace dart | 187 } // namespace dart |
| OLD | NEW |